Its black because there is nothing to refract and separate the sun into light and color. Our sky is 'blue' during the day because the sunlight is reflected, refracted etc by particles in the atmosphere.
It takes an atmosphere to break up the white light from the Sun (our star). You can see all the colors when you hold up a glass prism to the sunlight . A rainbow is sunlight broken up by passing through water drops which act like a prism. Sky is blue because the particles in the atmosphere scatter blue light more than any other color. When you fly in an airplane and look upwards out the window you may notice that the sky is a lot darker and not nearly as blue as when viewed from the ground. A little further up as the astronauts fly the sky appears black and the earth has a blue border of atmosphere. That helps you to understand why the sky is not blue when viewed at night.