It’s mostly due to a powerful greenhouse effect on Venus. Mercury essentially has no atmosphere while Venus has a thick atmosphere made mostly of carbon dioxide. This thick atmosphere traps heat that the surface radiates. This also means that Venus is hot all around on both the day side and the night side.
On the other hand, there is nothing to stop Mercury from radiating its heat out into space. While the day side is very hot, the night side is actually very cold because the surface cools off fairly quickly once it is no longer getting heat from the sun.
Latest Answers