Food contains chemical energy that originally comes from the Sun. The amount of energy a person needs each day can vary depending on factors like their body size, age, gender, activity levels, and environmental conditions like temperature. While two people may consume the same amount of energy, one may still gain weight due to differences in their metabolism or physical activity levels.