You know how when light passes through an angled bit of glass, it often looks like a rainbow. That is because, when light passes through the glass, it gets diffracted (bent), and that changes the wavelength. Different wavelengths appear as different colors. Bend it more, get a different color. Well the particles in the atmosphere act like the glass, in that the bend the light a bit as the light passes through it. They bend it just enough that it appears blue to us. Smog, or other particles may bend it more, and it may look orange.