energy is related to momentum ..
in empty space, the photon moves at c (the speed of light) and its energy and momentum are related by E = pc, where p is the magnitude of the momentum vector p. For comparison, the corresponding equation for particles with mass m is:
E2=p2c2+m2c4
The energy and momentum of a photon depend only on its frequency (ν) or equivalently, its wavelength (λ):
E=hc/λ