Dear student,
Energy of electromagnetic radiation depends upon frequency and wavelength of electromagnetic radiation.
Frequency of UV rays = 7x1014 - 1.5x1015 Hz
Frequency of visible rays = 4x1014 -7x1014 Hz
As frequency of UV rays is more as compared to visible rays so energy of UV rays is more as compared to visible rays.
Regards