Mercury receives intense solar radiation because it is so close to the sun. The sun beats down on it, heating it to, as you note, an insanely high temperature. However, Mercury really doesn't have an atmosphere. Earth's atmosphere is what allows it to retain solar radiation. Mercury doesn't have that, so any part of the planet that isn't in direct sun quickly loses its heat, radiating back into the vacuum. Mercury has a very long night, and that means the planet has lots of time to lose heat. The result? Very extreme temperatures.
Ok! You want to know that in night it is very cold and in the day time it is very hot because there is no temperature in Mercury like Earth so in the night time the hot radiation and UV rays goes back to the vaccume as the nights in Mercury is very long. In Earth there is a atmosphere so it traps the heat. ( CO2 )