Step 1: Understanding the Concept
Detritivores feed on detritus (dead remains of plants and animals) and break it into small pieces. This fragmentation helps decomposition.
Step 2: Apply to the options
The earthworm feeds on decaying organic matter in the soil and is the standard example of a detritivore.
Step 3: Eliminate
The frog and the snake are carnivores, and the leech is a blood-sucking ectoparasite.
Final Answer:
The detritivore is the earthworm.
\[ \boxed{\text{(D) }\text{Earthworm}} \]