The sky is a constantly varying palate of color which most people generally ignore. The array of color comes from sunlight, which sends us a seemingly infinite array of wavelengths of radiation, from infrared to visible to ultraviolet, on to gamma rays and so on. But it is the visible spectrum that gives us light. Blended together and without much interference, the sun at midday in a clear sky looks white because all the visible wavelengths blend together.
Stuff in the air such as dust, water droplets and ice crystals block, bend, deflect and polarize the light waves, with the effect of scattering the blue and violet waves most efficiently. We see the sky as blue and not violet because the rods and cones in our eyes are more sensitive to blue. Had our eyes evolved differently, the sky might be purple, instead. In the evening, the light is beaming through much more atmosphere due to the low angle, resulting in a red or orange sky.