Answer:
For 1: The air outside the cold glass is hot and it gets converted into water droplets due to the process of condensation.
For 2: The phase change occurs from liquid state to gaseous state and heat is transferred by the process of radiation.
Step-by-step explanation:
When a cold glass is left outside on a hot day, the air outside the glass is hot and when this hot air comes in contact with the cold glass, it starts to form water droplets by the process of condensation.
Condensation is a process in which gaseous state starts to convert into liquid state when temperature is decreased.

When a glass is left sitting in the direct sunlight and the water (liquid phase) on the surface evaporates into gaseous phase.

Here, heat is transferred by the process of radiation which is defied as the process in which heat is transferred whenever there is direct transfer of heat through space. Here, sunlight is transferred from the Sun to the glass on Earth.