The reason why it is always coldest all night just before dawn is a result of a combination of things that are related to the radiational cooling as well as the timing of solar radiation.
While the sun is setting and also throughout the night, the Earth continues to radiate the heat away, which causes the temperatures to drop.
And even after the sun does rise, the incoming solar radiation initially does not overcome the outgoing heat, so as a result the temperature continues to drop for a short period of time before the temperature finally starts to rise.
The Earth absorbs solar radiation and warms up during the day.
But at night, the sun is absent and the Earth radiates it's stored heat back into space, which is a process called radiational cooling.
The radiational cooling continues throughout the night and causes the temperatures to gradually increase.
And while the sun rises, the sun's initial rays are weak and are spread over a large area, which means that the incoming solar radiation is initially less than the heat that is being radiated away from Earth.
Also it takes some time which is often between 15 minutes to 30 minutes or more for the incoming solar radiation to become stronger than the radiation that is outgoing, at which point the temperature will begin to rise.
Clear skies also enhance the cooling as cloudless nights allow for more efficient radiative cooling, as there are no clouds to trap the heat and reflect it back to the surface.