Temperatures on the moon are extreme, ranging from boiling hot to freezing cold depending on where the sun is shining. There is no significant atmosphere on the moon, so it cannot trap heat or insulate the surface.
The moon rotates on its axis in about 27 days. Daytime on one side of the moon lasts about 13 and a half days, followed by 13 and a half nights of darkness. When sunlight hits the moon's surface, the temperature can reach 253 degrees F (123 C). The "dark side of the moon" can have temperatures dipping to minus 243 F (minus 153 C).
The moon tilts on its axis about 1.54 degrees — much less than Earth's 23.44 degrees. This means the moon does not have seasons like Earth does. However, because of the tilt, there are places at the lunar poles that never see daylight.
The Lunar Reconnaissance Orbiter measured temperatures of minus 396 F (minus 238 C) in craters at the southern pole and minus 413 F (minus 247 C) in a crater at the northern pole. That is the coldest temperature ever recorded in the solar system, colder even than Pluto. Scientists think water ice may exist in those dark craters that are in permanent shadow.
Layers of insulation
Astronauts on the moon were protected from the extreme temperatures by their spacesuits. The suits had several layers of insulating material covered by a highly reflective outer layer. The suits also had internal heaters and cooling systems.
The moon has an iron-rich core with a radius of about 205 miles (330 km). The temperature in the core is probably about 2,420 to 2,600 F (1,327 to 1,427 C). The core heats an inner layer of molten mantle, but it's not hot enough to warm the surface of the moon.
— Tim Sharp, SPACE.com Reference Editor