why is the sky blue
The sky looks blue because sunlight gets scattered by the tiny gas molecules in Earth’s atmosphere, and shorter‑wavelength colors like blue get scattered much more than the others, a process called Rayleigh scattering.
Quick Scoop
When white sunlight reaches Earth, it’s actually a mix of many colors, each with a different wavelength. Shorter wavelengths (blue and violet) interact more strongly with the tiny molecules of nitrogen and oxygen in the air, so they are scattered in all directions far more than the longer red or orange wavelengths. Your eyes are more sensitive to blue than to violet, and some violet is absorbed higher up, so the overall scattered light your brain interprets is “blue sky.”
At sunrise and sunset, sunlight takes a longer path through the atmosphere, so much of the blue light has already been scattered out of the direct beam before it reaches you, letting the longer‑wavelength reds and oranges dominate and making the sun and surrounding sky look red or orange near the horizon. This same scattering effect, described by Rayleigh’s law (stronger scattering at shorter wavelengths), also explains why hazy days and volcanic dust can create especially vivid red and orange sunsets.
In short, air molecules act like tiny scatterers that “steal” and spray blue light across the sky, so no matter where you look (away from the sun) you’re seeing blue-rich scattered sunlight.
TL;DR: Sunlight is made of many colors, but the atmosphere scatters short‑wavelength blue light much more than other colors, so that scattered blue light fills our view and makes the sky look blue.
Information gathered from public forums or data available on the internet and portrayed here.