The sky appears blue due to a phenomenon called Rayleigh scattering. When sunlight enters Earth's atmosphere, it consists of many colors, each with different wavelengths. Blue light has a shorter wavelength and is scattered in all directions by the gases and particles in the atmosphere more than other colors with longer wavelengths, like red or yellow. As a result, when we look up during the day, we see more of the scattered blue light, making the sky appear blue. During sunrise and sunset, the light has to pass through a thicker layer of atmosphere, scattering shorter wavelengths and allowing longer wavelengths (like red and orange) to dominate the view, which is why sunsets often appear reddish.