The theory is surprisingly simple.
The air and the ground get colder when no sun shines on them and hotter when the sun does. What we measure when we say it's colder is actually the air temperature. The sun's radiation has no effect on thermometers.
As you can see in the graph, minimum temperature occurs about 30 minutes to 1 hour after sunrise (hard to be exact with the ticks used).
For all dates, minimum temperature occurs at sunrise. Temperature drops throughout the night because of two processes. First, the Earth's radiation balance at the surface becomes negative after sunset. Thus, the surface of the Earth stops heating up as solar radiation is not being absorbed. Secondly, conduction and convection transport heat energy up into the atmosphere and the warm air that was at the surface is replaced by cooler air from above because of atmospheric mixing. Temperature begins rising as soon as the net radiation budget of the surface becomes positive. Temperature continues to rise from sunrise until sometime after solar noon. After this time, mixing of the Earth's surface by convection causes the surface to cool despite the positive addition of radiation and heat energy.
--source
1
The above is a schematic of the typical diurnal cycle of surface temperature (red) and the net energy rate due to incoming solar (black) and outgoing longwave radiation (blue).
1: The source of this material is the COMET® Website at http://meted.ucar.edu/ of the University Corporation for Atmospheric Research (UCAR), sponsored in part through cooperative agreement(s) with the National Oceanic and Atmospheric Administration (NOAA), U.S. Department of Commerce (DOC). ©1997-2010 University Corporation for Atmospheric Research. All Rights Reserved.