Producers, primarily plants and algae, convert solar energy into chemical energy through photosynthesis. This chemical energy stored in organic molecules then flows through the ecosystem as consumers eat producers or other consumers.