I just learned that the relative humidity of the atmosphere is lower during the daytime and it is at its highest at night. What is the explanation for this?
At night, the atmosphere cools down. At lower temperatures, the air can absorb less water vapor. The relative humidity is the ratio of absolute humidity (in g/m3) and the maximum possible humidity. Because the maximum possible humidity (saturation) decreases with falling temperature, the value of the quotient increases when the temperature decreases. If the relative humidity exceeds 100%, condensation occurs. Fog or dew develops.
Jurgen gave a very good explanation. The condensation of humidity at night is the phenomenon of dew which accumulates on plant surfaces in the open at night. This can be important for proliferation of plant pathogens which are often dependent on fluid water on plant surfaces.
Nicholas' focus on Food Science increases the importance of this question. Jürgen Neisius and Paul Reed Hepperly have provided good responses about relative humidity. However, better to understand their illustrations of dew and fog as consequences of nocturnal high relative humidity, it is necessary to know that dew-fall, or the condensation of moisture from the atmosphere is only one of the three sources of water observed on vegetation as dew.
As noted in the encyclopedic works of the Brethren of Purity at Basra around the 10th Century A. D. (western calendars), a second source of moisture that condenses as dew is evaporation from the relatively warm ground surface that was heated during the day. That process could be called "dew-rise" for the moisture diffuses upward to the vegetation that has been cooled by thermal radiation beyond the night air temperature and condenses there. One often finds condensation on the underside of objects like a plastic bag from this source.
A third source of "dew" is from within the plant leaves. Evaporation from plant surfaces and transpiration through leaf stomata are both suppressed at night by loss of solar energy, higher humidity, and stomata closure, but the roots continue to provide moisture (root pressure). When the internal pressure of water is sufficient, the excess is released through hydathodes that are often located at the tip of leaf serrations, for instance the tip of a grass blade or the edge of a strawberry leaf. The large droplets one observes around a leaf margin or grass blade tip are called guttation and are produced by this process.
When the morning sun casts the shadow of your head on dew you may see a brightness around that shadow due to scattering of the sunlight by droplets, and you may even see points of rainbow colors that are due to refraction of sunlight in the larger guttation droplets. The colors of the latter may pass through a whole spectrum as you move your head. It is quite a show. Len
It is the change in the "Dew point" which I am suggesting could increase the annual rainfall in the desert parts of the world, by replanting the native plants, at https://www.ecoseeds.com/cool.html