I will try to make it as simple as possible, but first of all the dew is formed during the night. This happens because there is always some water in the air. When it is hot, more water can be solved...
in a hot humid day lots of water accumulates in the air as vapor. when the temp drops the air capasity to hold the water is lowered until it reaches a point known as the dew point 'cos at this point...
The ground cools off at night (by radiating heat to space) and in the morning, moist air will encounter the cool ground and water will condense, because at lower temperatures, the air can hold less...
Dew forms on a cool morning because water molecules are always moving through the surrounding air. When the temperature drops, this moisture gathers onto something nearby.