It is because of condensation. When warm air hits the cold surface, it condenses, leaving droplets of water outside the glass.
Another way of putting it is, when water vapor in the air comes in contact with cold, like ice water, the molecules slow down and get closer together, causing the gaseous water vapor to turn back into liquid water droplets, which is condensation.