I always struggled with getting great pictures of the moon. Is there a good setting for that?
I love star/night sky pictures by the way. The first one you posted is beautiful to me!
There is actually a rule (guideline) for correctly exposing the moon. It's called the "Loony 11" rule (a play on "Lunar").
The rule says that if you use f/11 (and this only works at f/11), then you can set the shutter speed to the inverse of the ISO setting.
In other words... if you are using ISO 100, you can take a 1/100th second exposure. If you are using ISO 200, you can take a 1/200th sec exposure.
You use other f-stops (other than f/11) but you have to play the exposure triangle trading game... e.g. if you were using ISO 100 and 1/100th second at f/11, and you decide you'd rather use f/8 (one full stop larger on the aperture and thus collecting double the light) then you could halve the amount of time that the shutter is open (e.g. use 1/200th sec.) Notice how at f/8, the shutter speed is no longer the simple inverse of the ISO. That's why they use f/11... it's the only f-stop at which the simple inverse of the ISO will always work.
Here's an example of the moon taken using the "Loony 11" rule.
Gibbous Moon by
Tim Campbell1, on Flickr
The story on the above image is that I was at one of my astronomy club's "beginner's nights". These are more of an excuse to just get out and observe... but we also encourage beginners to bring their telescopes and we're happy to show them how to get their scopes working and locating objects. ANYWAY... someone asked about taking taking photographs of the moon through a telescope and since I happened to have my camera with me, I explained the rule, put the camera on the telescope, focused the scope, set the exposure, and took this. This was taken with just one single shot -- first time -- no guesswork involved. The point of it was to show that if you follow the rule... this image will "just fall out of the back of your camera" with no effort at all.
In fairness... it would be a bit harder to get this using a regular lens. My camera is attached to a 540mm focal length apochromatic refractor (telescope) and it has an f/5.4 focal ratio (it was 101mm of clear aperture). But I am also using a 2x TeleVue "Powermate" (think 2x tele-extender) which effectively gives me a 1080mm focal length and f/10.8 (which is staggeringly close to... f/11)!
The moon has an angular dimension of about 1/2º from edge to edge. If you use a dimensional field of view calculator you can determine how the large the moon would appear in a different focal length lens.
Here, for example:
http://www.tawbaware.com/maxlyons/calc.htm (scroll to the section labeled "angular field of view calculator"
If I enter a 55mm focal length (assuming a kit 18-55mm lens) and a 1.6x crop factor (APS-C size sensor... if you have Nikon enter 1.5 instead of 1.6) and tell it to compute. It tells me that the horizontal angular width of the field is 23º. Since the moon is about 1/2º, that means the moon will occupy merely 1/46th of the width of the frame (not very big.) The longer the focal length on your lens, the narrower the angle of view and the larger your moon in the final output. You can, of course, just crop in a little tighter as well.
Ok so that's the whole Loony 11 rule.
But there's another consideration for the moon. It's usually more interesting to shoot the moon when you have some foreground elements of interest. Photos that contain just the moon aren't as interesting unless the moon is filling the frame with lots of detail.
That means it's probably more interesting to take the photograph of the moon just as it's rising above the horizon (and whatever landscape or cityscape may be in the foreground.)
But then you get a new problem where if you do this on "just any night", the moon may not rise until many hours after sunset. If that happens, you won't really see much foreground interest because it'll likely be too dark to expose. Shooting long enough to expose the foreground adequately will probably blow out the moon and you'll just see a white blob.
SO... I find that taking a photo of the moon ONE DAY BEFORE the "full moon" works best. This is because on the day of the full moon, the moon is rising in the east at the same time that the sun is setting in the west. And by the time the moon has a chance to rise high enough above the horizon line to get above trees, buildings, or landscape features, it may be too dark. But if you take the photo ONE DAY EARLIER... then the moon will rise about 1 hour before the sun sets. By the time the moon is high enough to clear obstacles on the horizon, the sun will finally be setting but the sky will still have a dusky blue twilight glow. This gives you a rich blue sky instead of a black sky... and it gives you some amber twilight color on your landscape or cityscape (and if it's a city the lights are likely already coming on.)