A tiny, transparent worm in your garden may be a friend or a foe. Identifying the creature is a challenge, but worth the effort. You don't want to wipe out an ally just because it's squirmy, or ignore plant damage that could be prevented or mended, solely because the cause is almost too small to see.
If the worms in your garden are truly tiny, really colorless, and actual worms, they are most likely nematodes. Nematodes in gardens and landscape plants may be so small that they're only visible with a microscope, or they can be up to several inches long. Most are invisible to the naked eye, according to Sunset's Western Garden Problem Solver. They are transparent, or colorless—not white. Nematodes have no legs at all. Many pests called worms are actually caterpillars and have six legs, but nematodes are limbless, unsegmented roundworms.
Free-living nematodes feed on bacteria and fungi, while other nematodes and protozoa are omnivores. These serve important functions in the complex world of a healthy soil, and are beneficial members of the micro-organism population of your garden. They can help control certain plant diseases and insect pests, and make nutrients more available to your plants.
Parasitic nematodes are parasites, meaning they rely on another living organism to sustain them through their life cycles. There are species that infect humans, and even nematodes several yards long that parasitize whales. But in your garden, you're likely to have tiny (about 1/50 inch) plant-parasitic nematodes, who are definitely bad guys. The most common is the root-knot nematode, of which there are several varieties, which damage the delicate root systems of vegetables and perennials, causing stunted growth and possibly plant death. Infected plants will be yellowed, wilted and/or stunted. Pull them up and you'll see lumpy nodules on the roots that contain the nematodes and prevent your plants from taking in the nutrients they need. There are also foliar nematodes that damage leaves and stems.
Some nematodes attack insects instead of plants. These can be allies, as they sterilize, debilitate or kill their hosts, according to Randy Gaugler, Department of Entomology at Rutgers University. You can purchase these beneficial nematodes at garden centers and through catalogs, and safely disperse them in your garden and landscaping, because they are not a threat to plants or animals, but only their specific insect hosts. They can help control borers, caterpillars, soil grubs, weevils and root worms.
While insect-parasitic nematodes may be doing some kinds of damage in your garden, you will want to minimize the damage done by plant-parasitic varieties. This can be difficult. First, ask your local extension service if they can help you definitively identify damaging nematodes in your soil. They'll tell you if they are able to test for nematodes, and instruct you on how to bring them a sample for testing. Pull up and destroy infested plants to prevent further spreading of the bad nematodes. And consider solarizing your soil and letting it lie fallow for a year. This will kill most of the nematodes, and starve out the survivors.