Sunlight is the source of energy because producers such as grass and trees use photosynthesis to make energy from sunlight. Grass and trees are then eaten by animals like cows, chickens, and pigs. The animal takes in the energy it receives from the foliage, and humans in turn, receive energy from eating the livestock.