Temperature on the moon can range from -173 degree C at night to plus 127 degree C in the daytime. How do you you explain the vast difference in day and night temperature?

The Moon has no atmosphere with which to provide thermal inertia to its environment.