During exhalation (or breathing out), carbon dioxide is released along with water vapours. If one breathes out onto glass, the released water vapours collide with the surface of the glass, thereby making it cooler. As a result, the water vapours present in the air surrounding the glass condense and get attached to the glass surface. Consequently, the glass becomes wet.