Moisture in the atmosphere turns into dew droplets when it comes in contact with any cold substance. Green grass, leaves, metal wires, threads of spider webs etc are substances that collect dew. These substances absorb heat in day-time when the sun is up, and during night they lose the heat and become cool. The condition for dew to form is that the temperature of the substance must reach the dew point. And to allow the temperature to fall thus the atmosphere must be free of clouds. Clouds store heat. So if the atmosphere is cloudy then the heat emitted from clouds would not allow the temperature to fall to the dew point during night, and dew would not form. It is also necessary for formation of dew that relative humidity of air is about 100%.
A thing to note here is that the dew point itself is not a constant like boiling point or melting point. The temperature at which dew is formed is called dew point. Albeit, it would always be greater than 0° Celsius which is the freezing point of water; or else instead of liquid droplets we would see ice crystals for dew.