Dear Student
Producers convert solar energy into chemical energy in the form of organic compounds. The primary consumers derive nutrients from the producers. According to Energy Transfer Law, only 10% of energy is transferred from one trophic level to other. So the energy that is captured by autotrophs can not be reverted back to sun and the energy transferred to herbivores does not came back to autotrophs. It just keep on moving to next trophic level in unidirectional way. That is why, flow of energy in a food chain is always unidirectional.
Regards