Well, night time for one and to a lesser extent the dissipation of heat via the second law of thermodynamics. You are essentially asking why we don't get hotter and hotter during a sunny day. If Earth didn't rotate, we would continue to get hotter and hotter.
Another aspect is that as air (and water vapor therein) heats up, it can rise if it is even slightly warmer than the air around it. As air rises, it adiabatically cools meaning it changes temperature purely due to pressure change, not a change in energy. This is why it gets cooler the higher one goes up in elevation/altitude in the troposphere- as one increases in altitude one has less atmospheric mass above, meaning less pressure pushing down due to gravity. If the air cools to the dewpoint temperature (saturation humidity), the water vapor condenses into a cloud. When this occurs, we have several positive and negative climate feedbacks occurring sometimes simultaneously, here are two examples:
clouds have a high albedo (reflectivity) and reflect incoming solar radiation (negative feedback, cooling)
clouds absorb and reradiate thermal infrared radiation from the Earth (positive feedback, warming)
Also, as temperatures cool at night, they can reach saturation humidity and cause water vapor to condense or sublimate as dew or frost as well. This is another mechanism for regulating humidity besides precipitation and cloud formation.
It is a dynamic and complex system, thus it doesn't heat on and on here on Earth. However, such a heat loop is exactly what has occurred on Venus. Instead of water being the principle greenhouse gas there like it is on Earth, it is-- yep, carbon dioxide. Carbon dioxide does not condense or precipitate out of the atmosphere as easily, does not form reflective clouds, but does dissolve in water which can lead to it forming carbonate rocks here on Earth typically with the help of sea life such as coral.