Garden worms can be found in many colours, but black is not normally among these. Usually, when a black worm is found in a garden, it is likely a pest and not actually a worm at all.
Cutworms are the most likely black worms to be found in a garden. While these are technically caterpillars and not worms, the look like short, chunky black worms and can be found on plants or on the surface of the soil.
People may mistake millipedes in the garden for worms. Even though they resemble worms, millipedes have many pairs of legs, unlike worms that have none. Millipedes will also curl into a circle when disturbed, while worms will not.
Millipedes are harmless and don't need to be removed from the garden when found. Cutworms may cause a great deal of damage and should be eradicated if possible.