Worms bought from bait shops are normally chemically harvested, they pour something thick and slippery like dish detergent into the ground. The worms have to surface so they don't suffocate and are therefore easily captured.
That's safe and legal to use as bait because the amount of soap ingested by a fish and then by the people who eat that fish is so tiny, but you don't want to give any of your pets a steady diet of soapy worms. Get your worms from a worm farmer who raises his own wormbeds chemically-free and not kept on acidic peat moss or paper with ink on it and those worms are much safer.
They are nice and high in calcium and even though they only have about the same amount of protein as crickets it's more "bioavailable" because there's no chitin to digest and so more is actually digested. Earthworms are too rich for bearded dragons because of that, all that protein as a staple has been linked to fatty liver disease, much like feeding pinkies.
They are terrific as one part of a varied diet but not the best staple for omnivores like beardies. For insectivores or garter snakes they can be given more frequently as they process proteins better.
The Zombie Mama is here!