The sky looks blue. That's a fact. But the sky isn't actually blue — what you're seeing is a visual trick played by Earth's atmosphere. Here's the truth.
Light is many colours
Sunlight is white. White is every colour mixed together — red, orange, yellow, green, blue, indigo, violet. A prism will split them out if you want to see it.
The atmosphere scatters light
When sunlight hits Earth's atmosphere, it bumps into air molecules. Different colours scatter different amounts. Blue scatters a lot. Red scatters a little. This is called Rayleigh scattering.
Why blue wins
Because blue gets scattered all over the sky, your eye sees blue coming from every direction — not just from where the Sun is.
Why sunsets are red
At sunset, sunlight travels through much more atmosphere to reach you. By the time it does, most of the blue has been scattered away. The red and orange are what's left.
Mars flips it
Mars has much less atmosphere and lots of dust. During the day the sky is pinkish-red, and sunsets are blue. Opposite Earth.
The trick your eye is playing
If you could see all the wavelengths the way a camera sensor does, the sky would look a pale violet-purple. Human eyes aren't as sensitive to violet, so the brain rounds it to blue.