Dear student
The energy flow in an ecosystem is unidirectional it means that energy flows in one direction only from producer to consumers and does not return back to the producer.
Sunlight is trapped and stored by plants (producers) and by the process of photosynthesis Sun's energy is transformed into chemical energy. The plants are eaten up by herbivores and the herbivores are then eaten up by the carnivores. So the energy stored in plants gets transferred to the consumer animals . The energy flow is unidirectional it means that energy flows in one direction only from producer to consumers and does not return back to the producer.
Regards