the sun provides the required energy for plants in the form of heat and photons, this thus allows them to grow and produce glucose, the prime source of energy for plants. as herbivores eat plants, they consume the energy that they retained that originally derived from the sun. primary and secondary carnivores thus eat herbivores, as the cycle of energy retaining and passing occurs. decomposers thus eat all forms of life (whether they be plants or animals) and the energy that they retrieve from this is never made, nor lost.