You might think the answer is obvious - the sun isn't up! But the only reason the sky looks blue during the day is that sunlight scatters off of the atmosphere - if we didn’t have an atmosphere (like on the moon), the sky would always be dark, even when the sun is shining. So let’s rephrase the question - why is space dark?
I mean, space is full of stars - countless stars which are all about as bright as the sun, and in an infinite eternal universe, no matter what direction you picked, if you looked far enough in that direction, you would see a star or galaxy. So the whole sky should be as bright as the sun, night and day!
And since it's not, does the darkness of the night sky mean that there's some distance away from us when stars and galaxies just… stop? A boundary between something and nothing?
An "edge" to the universe?
Not exactly - all of our evidence seems to indicate that space has no edge. But the universe itself does - not a spatial edge, but a temporal one: as far as we know, the universe had a beginning. Or at least, a time about 13.7 billion years ago when the universe was so small and crumpled-up with itself that our standard notion of space and time breaks down.
And since only a finite amount of time has passed since this so-called beginning, that means that some of the stars necessary to fill up the "brightness in every direction" are so far away that light from them plain hasn't had time to reach us yet… it's as if the universe were a big thunderstorm and we're still waiting to hear the thunder from the really distant stars.
But wait, it’s better than that - since light takes time to travel across the universe, when we point our telescopes at something really far away, we're actually seeing that part of universe as it was when the light was emitted. So when we look at 13.5 billion-year-old light, it's not that we don't see stars just because light from them hasn't gotten to us yet - we don't see any stars because we’re getting a peek at the universe before any
stars had formed! A star-less universe! Now that sounds to me like a pretty good reason why we look up and see a dark night sky.
But… it’s not. I mean, it is true that we can find points in the sky where there aren’t any stars by looking past the earliest stars and thus farther back in time. But even when we point our telescopes past the earliest stars, we still see light. Not starlight, but the light left over from the big bang. And we detect this “cosmic background radiation” coming more or less evenly from all directions, forming a background beyond the stars.
So, I guess the night sky ISN’T actually dark to begin with. Right... so if our telescopes tell us that the night sky isn’t dark, then why does it look dark?
Here’s a clue to the real answer: when the Hubble telescope photographed the distant stars of the astoundingly beautiful Hubble extreme deep field, it took the picture using an infrared camera. Why? Well, distant stars and galaxies are moving away from us because the universe is expanding. So the same way a record slowing down lowers the pitch of my voice, the doppler effect causes stars moving away from us to become redder, and the farther away they are, the faster they move away from us and the redder they become, until they become… infrared. And then we can't see them any more. At least not with our human eyes - and that’s why the night sky appears dark!
In summary: If we lived in an infinite, unchanging universe, the entire sky would be as bright as the sun. But the sky is dark at night, both because the universe had a beginning so there aren't stars in every direction and more importantly because the light from super distant stars (and the even-more-distant cosmic background radiation) gets red-shifted away from the visible spectrum by the expansion of the universe, so we just plain can't see it.
Finally! We’ve shed some light on why the night sky is dark. And why it isn’t.