Special relativity tells us that mass and energy are the same thing, so if photons have energy, they must have mass. Momentum is the product of mass and velocity, so if they have momentum, they must have mass. However, as Big John says, they have zero rest mass. Of course they cannot exist at rest so whenever photons exist, they have mass.
http://math.ucr.edu/home/baez/physic...oton_mass.html

If the rest mass of the photon was non-zero, the theory of quantum electrodynamics would be "in trouble" primarily through loss of gauge invariance, which would make it non-renormalizable; also, charge-conservation would no longer be absolutely guaranteed, as it is if photons have vanishing rest-mass. However, whatever theory says, it is still necessary to check theory against experiment.
http://www.everything2.com/index.pl?node=photon

Photon Mass
Mass is a confusingly misused term. We all know Einstein's rather famous mass-energy equivalence, E=mc², and it's fairly obvious that photons have energy, so they must have mass, right? Well, no. The correct way to interpret E=mc² is to use it define the energy of an object when it is not moving, or rest energy, E0, in terms of a fixed quantity, it's mass. This is sometimes emphasised by calling this value the rest mass, but this isn't helpful, a particle only has one mass, it may have variable energy depending on how fast it is travelling, but mass is constant.

When a particle is moving the total energy is given correctly by, E² = m²c4 + p²c², where p is momentum. You can see if the object is at rest then p²c²=0, and the equation reduces back to E0=mc². In the case of a massless, but moving, particle then it reduces to E=pc. This means that a particle can have energy without mass. You can't stop photons so they always have momentum.

Theoretically, if photons did have mass we would see deviations from the Coulomb inverse square law. It is photons that transfer the electromagnetic force, they are gauge bosons. If they are massless then they can have infinite range and the 1/r² law holds true, if they have mass, they become limited in their range so the 1/r² rule will not hold anymore. Experimental tests for photon mass concentrate on finding such deviations. The upper limit for photon mass so far stands at 3x10-27 eV, which is about 10-46 kg.