Sunlight actually consists of many colors. When it enters the Earth's atmosphere, blue light is more easily scattered by air molecules than colors such as red.
Because blue light is scattered in various directions, our eyes see the sky as if it is filled with blue from all sides.
Interestingly, when the sun rises or sets, the path of light through the atmosphere is longer so red and orange colors become more dominant. So it turns out that the change in sky color has a scientific explanation.