Earthworms are excellent composters. They eat a wide variety of foods, from plant vegetation to animal waste, to fruits and vegetable scraps. Having digested this matter they release it as composted soil, which contains many minerals and nutrients that would otherwise have remained trapped and inaccessible.