While it's true that photons have no *rest mass*, they do have energy and momentum, which are related to their frequency and wavelength.