Sunlight is the principal energy source sustaining most ecosystems because photoautotrophs convert light into chemical energy stored in biomass.
Chemical energy then reaches consumers through feeding. This is a useful generalization: it describes a widespread pattern and supports predictions, but it is not an explanation of every ecosystem and must allow known exceptions.
Cave ecosystems can depend on organic matter imported from sunlit areas, while communities below ocean light penetration can depend on sinking detritus or chemoautotrophic production powered by oxidation reactions.
In a grassland, sunlight → producer biomass → herbivore → predator. In a deep-sea vent community, chemical oxidation can supply the primary energy input instead.
Sunlight supplies energy, not carbon atoms. ‘Principal source’ means the dominant global pattern, not a universal rule without exceptions.