They look like big peanuts with long eyestalks, and they squirt out gooey light green liquid as a form of self-defense.
They were all in Mrs. Puff's Vegetable Garden. Mr. Krabs tries to steal them from Mrs. Puff's garden because he wants to give food to Pearl, who was having her growth spurt and is getting even hungrier by everything she eats. Mr. Krabs thought that the peanut worms were regular peanuts, but he then found that they were peanut worms.