The energy of a photon or a light is calculated from the product of the Planck's constant and the frequency of the light. We can calculate the frequency from the wavelength since they are related. We do as follows:
E = hv
where h is Plank's constant (6.63× 10^-34 m^2 kg / s)
v is frequency and equal to speed of light/wavelength (c/w)
We can rewrite energy as follows:
E = hc/w = 6.63× 10^-34 (3x10^8) / 590x10^-9
E= 3.37x10^-19 J