The sky looks blue because sunlight is scattered by tiny molecules in Earth's atmosphere. Sunlight contains many colors, but shorter blue wavelengths scatter more strongly than longer red and orange wavelengths.

Why scattered blue reaches your eyes

When sunlight enters the atmosphere, blue light is redirected in many directions. That scattered blue light reaches your eyes from across the sky, making the sky appear blue on a clear day.

Why sunsets look different

At sunrise or sunset, sunlight travels through more atmosphere before reaching you. Much of the blue light is scattered away, leaving warmer colors like red, orange, and pink more visible.

The same idea of light bending and spreading also helps explain what causes a rainbow.