Let's first Find the frequency. Energy E and frequency ν are related by the Equation E = hν, where h is the constant of Planck h = 6.63 10^-34 J.s
By hypothesis, E = 5.0910^19 J
E = hv so v = E/h = (5.0910^-19) / (6.63 10^-34) ≈ 7.677 10^14 s.
Now Wavelength λ = celerity c / frequency ν, where c = 3 10^8 m/s
So λ = (310^8) / (7.677 10^14) ≈ 3.907 * 10^-7 m = 390.7 nm
Hope this Helps! :)