Why is the sky dark in space?
The sky is dark in space because there is almost no air to scatter sunlight. On Earth, molecules in the atmosphere scatter blue light in every direction, filling the sky with light. In space, sunlight travels in straight lines, so unless you look directly at a light source, you see black.
Earth's blue sky
Sunlight is made of many colors. When it enters Earth's atmosphere, gas molecules scatter the shorter blue wavelengths far more than the longer red ones. This scattering, called Rayleigh scattering, is why the daytime sky is blue.
No scattering in space
Space is close to a vacuum, so there is almost nothing to scatter light. Astronauts see a black sky even when the Sun is shining brightly.
On the Moon, which has almost no atmosphere, the sky is black even during the day.
Why can't we see more stars?
In photos from space, stars are often missing. This is because cameras are set for the bright Sun, Earth or Moon, so faint stars do not show up.
Olbers' paradox
Astronomers once asked why the night sky is dark at all, if the universe is full of stars. This puzzle is called Olbers' paradox.
Part of the answer is that the universe has a finite age, so light from very distant stars has not had time to reach us. The expansion of the universe also stretches light into wavelengths we cannot see.