It sounds like you are talking about the energy contained on the Earth at any point in time, which (off the top of my head) would have come mainly from the sun and the the Big Bang (when the Earth was created), but can also include many other smaller factors, ie. meteors hitting the earth, light/radiation energy from other celestial boddies aside from the sun etc.