Redshifting of Light and the expansion of the universe So I have learned in class that light can get red-shifted as it travels through space. As I understand it, space itself expands and stretches out the wavelength of the light. This results in the light having a lower frequency which equates to lowering its energy.
My question is, where does the energy of the light go? Energy must go somewhere! 
Does the energy the light had before go into the mechanism that's expanding the space? I'm imagining that light is being stretched out when its being red-shifted. So would this mean that the energy is still there and that it is just spread out over more space?
 A: Dear QEntanglement, the photons - e.g. cosmic microwave background photons - are increasing their wavelength proportionally to the linear expansion of the Universe, $a(t)$, and their energy correspondingly drops as $1/a(t)$. Where does the energy go? It just disappears.
Energy is not conserved in cosmology.
Much more generally, the total energy conservation law becomes either invalid or vacuous in general relativity unless one guarantees that physics occurs in an asymptotically flat - or another asymptotically static - Universe. That's because the energy conservation law arises from the time-translational symmetry, via Noether's theorem, and this symmetry is broken in generic situations in general relativity. See

http://motls.blogspot.com/2010/08/why-and-how-energy-is-not-conserved-in.html
Why energy is not conserved in cosmology

Cosmic inflation is the most extreme example - the energy density stays constant (a version of the cosmological constant with a very high value) but the total volume of the Universe exponentially grows, so the total energy exponentially grows, too. That's why Alan Guth, the main father of inflation, said that "the Universe is the ultimate free lunch". This mechanism (inflation) able to produce exponentially huge masses in a reasonable time frame is the explanation why the mass of the visible Universe is so much greater than the Planck mass, a natural microscopic unit of mass.
A: Other answers have covered the key points correctly, but I'll jump in too, maybe emphasizing a slightly different angle.
It's not just that energy is not conserved -- even defining the total energy of the Universe (or even the total energy in any reasonably large volume) is problematic and, in some sense, unnatural.
What people usually have in mind when they talk about the total energy of the Universe (or a large volume -- from now on I'll stop writing that) is something like the following: Figure out the energy of each particle in that volume, and add 'em up. That's a sensible procedure for figuring out total energy in other contexts: it works great if you want to talk about the energy in all of the air molecules in this room. But it only works if all of the individual energies are determined in the same inertial reference frame. And in the expanding Universe (or any curved spacetime), there are no inertial reference frames that cover the whole region.
When people worry about energy non-conservation as applied to CMB photons, what they're implicitly doing is calculating each photon's energy in the local comoving reference frame (the one that's "at rest" with respect to the expansion). But all of the different comoving frames are in motion with respect to each other, so it's "illegal" to add up those energies and call the result a total energy. 
Think of a Newtonian analogy: if one person measures the kinetic energy of something on board a moving airplane, and another person measures the kinetic energy of a different object on the ground, you can't add them up to get a total energy. And certainly the sum of those two things won't be a conserved quantity.
Just to be clear: I know that there are a bunch of contexts (e.g., asymptotically flat spacetimes) in which it does make sense to talk about energy conservation in various forms. But in this specific context, I think that the above is the essence of the issue.
A: The Friedman-Lemaitre-Robertson-Walker (FLRW) equations can be derived in an elementary way from Newton’s laws, where the energy in the motion of a density of mass-energy in a region is determined by the gravitational potential.  The FLRW energy (so called energy) equation for the evolution of a scale parameter of spatial distance $a$ derived from the metric is,
$$
\Big(\frac{\dot a}{a}\Big)^2~=~\frac{8\pi}{3}\rho~-~\frac{k}{a^2}
$$
where $\rho$ is the energy density.  The Hubble parameter or constant with space at each time is $H~=~{\dot a}/a$. We set $k~=~0$ for a flat space $R^3$ to match observations, and which recovers what is derived from Newton’s laws.  Energy density for photons scales inversely with the length of the box.  The box is thought of as a resonance cavity that is equivalent to a situation where the number of photons that leave is approximately equal to the number of photons that enter.  During the radiation dominated period things were in a near equilibrium, so this is not out of line with some physical reasoning.  In a stat-mech course an elementary problem of N-photons in a box uses the same logic, the energy of the photons scales inversely with the size of the box.  So the energy of photons $E~=~hc/\lambda$, and the wave length scales with the scale factor a.  So the density scales as $\rho~\sim~hc/a^4$.
So with this et up let us propose a time dependency on the scale factor a with time $a~\sim~t^n$.  Put this into the "energy equation" and turn the crank and you find that $n~=~1/2$.  The scale factor grows as the square root of time.  This is an energy equation, and the balance tells us that the loss of energy in photons is equal to the gain in gravitational potential energy. This connects well with Newtonian analysis and the Pound-Rebka experiment.
We may continue further, for the photons in a box exert a pressure on the sides of the box $p~=~F/a^2$, and the force induces an increment of change in the size of the box $dE~=~Fdx$.  The force is distributed on 3 different directions and so $p~=~ρ/3$.  This may then be used in the equation $pV~=~NkT$ to find that for $p~\sim~a^{-4}$ and $V~\sim~a^3$ with the above $E~\sim~1/\lambda$ that $\lambda~\sim~1/T$, which is Wein's law for the wavelength as the peak of the blackbody curve.  The proportionality of the energy density with scale factor and temperature also gives $E~\sim~T^4$.  So this physics is remarkably in line with laboratory understanding of the basic thermodynamics of radiation.
The matter contribution scales as $a^{-3}$, which was smaller than the radiation contribution for a time.  Around 380,000 years into the evolution of the universe the matter density surpassed the radiation density.  The CMB demarks this transition in the mass-energy which dominated the universe. The above dynamics still apply for photons, but radiation is now a minor player in the spacetime structure of the universe.
A: The answer is the energy goes into the gravitational field. 
If you take the simplest case of a spatially flat homogeneous cosmology with no cosmological constant then the equation for energy in an expanding volume $V(t) = a(t)^3$ is 
$E = Mc^2 + \frac{P}{a} - \frac{3a}{\kappa} (\frac{da}{dt})^2 = 0$
$M$ is the fixed mass of cold matter in the volume, $\frac{P}{a}$ is the decreasing radiation energy in the volume with $P$ constant, and the third term is the gravitational energy in the volume which is negative. The rate of expansion $\frac{da}{dt}$ will evolve in such a way that the (negative) gravitational energy increases to keep the total constant and zero.
For a more general discussion of energy conservation in general relativity see my paper  http://vixra.org/abs/1305.0034
A: There are 2 ways to look at the apparently redshifted energy we receive from distant galaxies


*

*The energy we receive is less than the energy emitted.

*The energy we receive is the same as the energy emitted, but our expectation is wrong.


Most would agree with statement 1, so I will explain statement 2
If we are observing from some distance (say a million km from Earth) a photon emitted from Earth and a similar photon emitted from the Moon, we expect that the one emitted from earth will have a very slightly lower frequency due to gravitational redshift.
So we are expecting a lower frequency from the earth generated photon because the fabric of the universe has been compressed around earth more than it has around our Moon.
Looking back in time, the fabric of the universe was more compressed than it is now. So maybe we should expect that a photon generated a very long time ago would have had a lower frequency than its modern day counterpart.
