The clear cloudless sky at day-time is blue because air molecules in the air scatter the blue light from the sun instead of scattering red light. When we look to the sun while sunset, we generally see orange and red colors because in that case, the blue light scattered out from the line of the sight.
To have a deep understood of why the sky is blue, we should consider the nature of light and how sunlight is being interacted with the molecules of gases to make the giant atmosphere. Sunlight is a mixture of seven colors of the rainbow. Sunlight rays are known as electromagnetic waves that may cause electrons and protons to oscillate up and down when the light passes in the atmosphere. Charge produces radiations having the same frequencies but can spread in all directions. The incoming sunlight by the air molecules is known as scattering. The blue spectrum's component of light gives shorter wavelengths and has a higher frequency as compared to the red component. As the light passes through the air, then blue color causes the charged particles to do faster oscillation that the red one. If the oscillation is more, then more the scattered light produces. The blue color will be scattered more.
So, that is the reason blue color is more scattered in all directions 10-times more effectively than red color so we see blue sky.