I got this from the interweb. Man, learning is fun.
Does light have mass?
That depends on which of two definitions of ’mass’ a particular physicist likes to use, and what type of light you’re talking about.
One definition of mass says that anything which has some gravitational pull on other objects has mass. By that definition, light has mass. This definition of mass is the same as the definition you get if you ask what ’m’ you have to multiply the velocity ’v’ by to get the ’momentum’ of an object. Momentum is a measure of how much stuff is moving which way. When things bump into each other, the total momentum doesn’t change even though it might be traded between the objects. Think of when two balls bounce off each other. Light has momentum, which means we can actually measure the push it gives to objects it runs into. This is the definition used by Einstein, for example in the famous equation E=mc^2.
On the other hand, physicists often find it convenient to think of mass as something that doesn’t depend on how an object is moving, also sometimes called the ’rest mass’. They call the mass of some object the mass that it would have according to somebody who says the object isn’t moving. Light always is moving, so by this definition (or more careful versions of it) a light ray has no mass.
Switching between those definitions can lead to a lot of confusion.
If you have a box of light, with the rays going every direction, the light does contribute to the total mass of the box, by any definition.