Answer
Hotter stars emit more blue light because these photons are high-energy with a shorter wavelength. Cooler stars emit more red light because these photons are lower energy with longer wavelengths. Stars with temperatures in the middle, like our sun, emit more yellow light.
Work Step by Step
A star emits radiation which approximates the radiation emitted from a blackbody. According to Wien's law, objects with higher temperatures emit more high energy photons with shorter wavelengths, while objects with lower temperatures emit lower energy photons with longer wavelengths.
Hotter stars emit more blue light because these photons are high-energy with a shorter wavelength. Cooler stars emit more red light because these photons are lower energy with longer wavelengths. Stars with temperatures in the middle, like our sun, emit more yellow light.