Earthworms are important decomposers in the ecosystem. They break down organic matter, such as dead plants and animals (detritus), and enhance nutrient recycling in the soil. Their digestive system helps in the conversion of organic materials into humus, which improves soil structure and fertility. Therefore, the correct answer is option (B).