The daily temperature cycle is controlled by the balance between incoming solar radiation and outgoing IR.

During the day, solar heating of the ground leads to very steep temperature contrasts in the lowest meter (recall that condution operates hear and air is a poor conductor).

During the night, IR cools the surface more than the air, leading to strong temperature inversions in the lowest meter.