Can energy be traced back to somewhere other than the sun?
I think you need to be more specific; as a start, are you talking about energy on earth? and what sort of energy are you thinking of, stuff like oil and gas? or less natural things like nuclear? or are you being more general and talking about movement of planets and such like?
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.
The vast majority of energy of the part of the earth below the crust can be traced back to gravitation potential energy expended during the formation of the earth.
Separate names with a comma.