
Lauren H. answered 03/13/19
Experienced High School Chemistry Teacher
First, yes, photons lose energy as they travel. From the Internet: The answer to your first question is yes, for all intents and purposes, photons traveling through intergalactic space could, and in fact do, lose energy due to the expansion of spacetime in the Universe. As the photons lose energy their wavelengths become longer.
But, planets close to a star receive more photons per square unit of surface area than do planets further away because the "rays" of photons spread out in all directions as they travel further away from the star.