In class, we learned that the energy (in eV) in a photon of wavelength lambda (in nanometers) is given by
E = 1240/lambda
In physics 212, it is given by E = h_bar nu (Greek symbol, looks like a v). We can get from this equation to ours by first replacing nu (radian frequency in rad/s) with 2*pi*f (f is frequency in cycles/s). Now replace f with c/lambda (speed of light over wavelength). Since h_bar is a modified Planck's constant (h/(2*pi)), the 2*pi cancels giving:
E = h_bar v = h_bar (2PIf) = h c/lambda = 1240/lambda