We know that the Sun is the biggest and brightest star of all. So, even the hottest star is nothing compared to the energy of the Sun. Thus, it is obvious that the hottest star would have a lower energy. Now, for the wavelength, we use the equations below:
E = hc/λ
where
E is the energy
h is a constant of proportionality called Planck's constant
c is the speed of light
λ is the wavelength
From the equation, you can tell that the energy is inversely proportional to the wavelength. Thus, the lower the energy, the longer the wavelength. So, the answer is D.