Light behaves like a wave, and the different colors we perceive are the result of light hitting our eyes at different wavelengths. The air molecules in our atmosphere scatter this visible light, with a "preference" towards light of shorter wavelengths -- blue and violet light. Light of longer wavelengths (green, yellow, orange, red), doesn't pass through to us as visibly until later in the day, when the sun's light has more atmosphere to pass through before it reaches our eyes. The blue light becomes so scattered by the air molecules in its way at this point that we're finally able to see those yellows and reds coming through on our end.