You can have a control group and then have other groups of varying levels of pollutants. The survival rate of earthworms will show how polluted the soil is.
Biologists use it all the time.
For example, say there is a type of frog that is commonly found in retention ponds and ditches. If the scientists know that this frog is very sensitive to certain chemicals then the frog can be used as a biological indicator. If the scientists find the frogs by the thousands everywhere except downstream from a large factory, then the scientists know to run some lab tests around the factory. Insects, amphibians, fish, earthworms, birds, etc. Earthworms are actually a very good indicator.