Okay, so the incident light we see from stars is such a small intensity that when pictures are taken in space the huge amount of light from the sun 'washes' out the camera. The exposure time isn't long enough to capture them. This is true on earth as well. Try taking a picture of the sky on your shitty iphone and let me know how it goes. The moon is a good example, the light reflected off of it is too bright to get all the detail you can see with your eyes. Those pictures with thousands of clear stars and planets and shit are taken with at least 30 second exposure time and a high ISO.