Photons have momentum. In the case of a particle, its relativistic mass increases without limit as it is accelerated (special relativity). E = mc^2 (famously), which gives a clue to the possibility of mass and energy being interchangeable. A photon is a concept of quantum physics i.e. light behaving as particles. If it was at rest (!) then a photon might be considered to have no mass; we can twiddle the equations to get E = pc where p is the momentum.
This might seem like trickery, but Lebedev proved experimentally that it is so, and the Nichols radiometer demonstrates it.