Actually, the energy of a photon is:
E = hc/lambda, where
lambda is the wavelength of the photon, and
h = 6.626*10-34
Js, and is a universal constant called Planck's constant
One additional clarification...photons do have some (tiny amount of) mass, but it's not a constant value. It's relative to the photon's momentum.