Ecosystem components include biotic factors like plants, animals and microorganisms, as well as abiotic factors such as sunlight, water, temperature and soil. Producers such as plants use photosynthesis to convert sunlight into energy, while consumers rely on producers and other organisms for food. Microorganisms in the soil like bacteria and earthworms help decompose organic matter and cycle nutrients. Together these living and non-living factors interact to form ecosystems.