Answer: The moon does not have an atmosphere, whereas the earth does.
Explanation: The atmosphere of the earth, along with the presence of water, allows for the temperature to be much more stable (think of how greenhouse gases absorb lots of heat). The moon does not have that kind of atmospheric protection, so the temperature can increase and decrease much more drastically.