Light is a kind of energy that can travel through space. Light from the sun or a light bulb looks white, but it is really a mixture of many colors. The colors in white light are red, orange, yellow, green, blue and violet. You can see these colors when you look at a rainbow in the sky. The sky is filled with air.
Air is a mixture of tiny gas molecules and small bits of solid stuff, like dust.
As sunlight goes through the air, it bumps into the molecules and dust. When light hits a gas molecule, it may bounce off in a different direction. Some colors of light, like red and orange, pass straight through the air. But most of the blue light bounces off in all directions. In this way, the blue light gets scattered all around the sky.