Think of it like this. The extra people and animals can only come into being by consuming other animals and vegetable matter. Where does this come from? The cows and chickens we eat arise from eating vegetable matter. Where does it come from? It just grows. How does it grow? It converts light energy from the sun into matter by taking the energy of sunlight and using it to combine carbon from the air with water to create carbohydrates--the food animals eat, including us. So all of us, in a way, owe our existence to sunlight that falls onto the Earth. This explains why so many indigenous people's cultures worship the Sun God above all others. It also sort of fits with Einstein's famous theory that Energy (sunlight) equals Mass (plants and animals). So your next question is: if the Earth is constantly bathed in sunlight, how come it doesn't get heavier. The answer is: while the Earth "gets" energy from the sun, it also "radiates" energy in the form of heat out into space. At this period in time, the energy coming in is equal to the energy going out, and so we are in a steady state, and that is one key reason we have life on Earth. A scientist has discussed this already at science.ca in a related question and anwer.
making a small donation to science.ca.