This question came up in Quora today and I answered it.
Which entry level DSLR should I buy for getting good quality images of the night sky?
You want a camera that can expose dark scenes for long enough – in other words that it can expose for long shutter speeds. The Nikon D3300 for example can expose for a maximum of 30 seconds.
That might seem like a long time, but if you stop the aperture down in order to get good depth of field, then you are going to need long exposure times.
This is all with the camera on a tripod of course.
You could increase the ISO (which makes the camera sensor more sensitive to light) in order to cut down exposure times – but that carries a penalty which is that images are noisier.
And for night photos where there is already a lot of ‘dark’ you are going to see that noise more than for a daylight shot – so stick to low ISO.