UV = shorter wavelength; Infra-red=longer wavelength.
energy of photon is E=hf, where f = frequency and h= a constant
now, frequency is inversely proportional to wavelength, so UV light photons have more energy than infra-red photons.
Its worth noting that both these types of radiation are electromagnetic radiation.