In short, even though photons have no mass, they still have momentum proportional to their energy, given by the formula p=E/c. Because photons have no mass, all of the momentum of a photon actually comes from its energy and frequency as described by the Planck-Einstein relation E=hf.