The sky appears blue primarily due to a phenomenon called Rayleigh scattering. When sunlight enters Earth's atmosphere, it collides with air molecules and small particles. Sunlight, or white light, is made up of many colors, each with different wavelengths. Blue light has a shorter wavelength and is scattered more than the other colors. This scattering causes the blue light to be spread across the sky, making it appear blue to our eyes. During sunrise and sunset, the light has to pass through more of the atmosphere, scattering shorter wavelengths and allowing longer wavelengths (like red and orange) to dominate, which is why we see those colors during those times.