Grid bugs are one of the weakest monsters. They usually deal no damage at all, unless they manage to zap you as well ("You get zapped!"), and even then the damage is very small. This electric attack does not break your rings and wands unless they are higher level than zero.
Grid bugs are unique in that they cannot move or attack diagonally. When polymorphed to a grid bug, attempting to move diagonally will provide the message "You can't get there from here..."
They are nothing to worry about once you pass level 2.
If you need to train up a weapon skill, grid bugs can be useful as target practice. Or, you can let your pet kill them, to help it grow stronger.
The concept of grid bugs came from the 1982 Disney film, Tron.
These electronically based creatures are not native to this
universe. They appear to come from a world whose laws of
motion are radically different from ours.
Tron looked to his mate and pilot. "I'm going to check on
the beam connection, Yori. You two can keep a watch out for
grid bugs." Tron paced forward along the slender catwalk
that still seemed awfully insubstantial to Flynn, though he
knew it to be amazingly sturdy. He gazed after Tron, asking
himself what in the world a grid bug was, and hoping that the
beam connection -- to which he'd given no thought whatsoever
until this moment -- was healthy and sound."