The role of solar energy in ecosystems