photons are said to have no mass, or specifically no rest mass, for two reasons. well really theyre the same one but anyway. firstly because an inertial observer can never catch up with a photon and view it at rest. secondly because mass addition requires something traveling at the speed of light to have infinite mass (as a product of its initial mass) which requires an infite amount of energy to accelerate to c. thus nothing with mass can get to speed c, but because the mass addition is a product value something with zero rest mass can.