Blue light scatters away
The Sun emits all visible wavelengths roughly equally, appearing white in space. From Earth, Rayleigh scattering removes some blue from the direct beam, shifting it toward yellow. At sunset, even more blue scatters, making it orange or red.