You will see that your assumptions about the experiment can make a difference. At the end, I give you a twist that can make all of the difference:
Let's make some simplifying assumptions, and explain why we these assumptions make sense:
First let's address the macroscopic conditions. By this, I mean the conditions that exist uniformly over most of the space in which this experiment takes place:
Regarding the glass of iced water, let's assume it contains ice for the duration of the experiment. (The reason is that this is apparently a given - you have a glass of iced water.)
We can also assume that the glass of iced water is at a constant temperature for the duration of the experiment. The reason is that as ice melts, it absorbs heat without changing temperature. This is what happens when a material undergoes a phase change. (solid to liquid or liquid to gas, for example). So, with the first assumption (there is always ice present), then the temperature will remain constant. (Phase Transition of Water)
For the experiment in the sun and the experiment in the shade, all other conditions are identical. (We might assume an open space, since a the glass is on a picnic table.) So, for example, air temperature (see below) and pressure are identical. If it's windy at all, then this is the same in both cases. (Let's assume it's not windy, but you can take this further and ask yourself how that would alter the conclusion, if it does.)
The air temperature is the same in the shade as it is in the sun. I know what you are thinking, but you have to understand that air temperature is a measure of the kinetic energy of the molecules in the air. (Why Official Temperatures are Always Measured in the Shade) Since the molecules are actually travelling very fast (at the speed of sound, on average), it doesn't take long for them to move around between a shaded area and an unshaded area. (If you question that, think about how quickly an odor can travel, even in "still" air. If you're still not sure, try an experiment with something that you can easily smell.)
The level of humidity is the same in the shade as it is in the sun. This is the same as saying that for a given volume of air, the fraction of molecules that are water molecules is constant regardless of whether they are in shade. The humidity depends on the air temperature and the kinetic energy of the air molecules to keep water from condensing out. Also, water molecules in the air travel at speeds similar to all other air molecules.
Now, let's look at some microscopic conditions, specifically at the surface of the glass:
(Convection) heat transfer will occur at the surface of the glass.
Air molecules, including the evaporated water (the humidity) will lose energy when they encounter the cold surface of the glass. This is called convection heat transfer (convection), which is the transfer of kinetic energy from the gas to the cold glass. Enough water molecules can lose energy to come to the point of condensation, producing the water on the side of the glass. (Other types of molecules in the air will not condense so readily at the temperatures we are talking about here.)
Water molecules on the side of the glass will gain energy when they are hit by fast moving air molecules. This can be sufficient to cause evaporation.
This is a continuous process, but obviously if you see condensation happening, then the rate of condensation must be greater than the rate of evaporation!
- Radiation heat transfer will occur at the surface of the glass. Radiation from the sun impinging on a thermometer heats the thermometer. As explained earlier, this is why we measure air temperature in the shade. It can also transfer enough heat to cause some of the water molecules on the side of a glass to evaporate. This would be in addition to evaporation due to convection.
We have assumed that apart from the sun/shade difference, all conditions are equal between the two experiments:
The glass will keep a constant temperature so long as there is ice, because heat added from the environment only goes to changing the ice from solid to liquid.
The effects of air temperature has been explained as being equal, because air temperature is a measure of the kinetic motion of the air molecules, and all of the molecules move freely and quickly between the shade and the sun.
Conditions at the surface of the glass can result in phase changes. This can cause condensation and evaporation all at the same time. Energy transfer mechanisms control the net results.
The experiment done in the sunlight has one additional energy source influencing the condensation and evaporation process. Radiation can increase evaporation.
We have to conclude that the net of evaporation vs. condensation differs between the two experiments, and there will be less water on the side of the glass when the experiment is done in the sunlight.
Now whether this will be a noticeable amount is a different matter. But under the right experimental conditions this can be measured with precision.
Now Remove One Assumption
I wouldn't put it past my high school physics teacher to do something like this, but lets assume that the "iced water" hasn't reached equilibrium when the experiment starts. That means that as ice melts, the released liquid water will be at a colder temperature than the rest of the liquid.
What this means is that some of the heat energy from the water must go to warming this released water.
In the shaded experiment, we expect the ice to take longer to melt. (Less radiant energy on the glass!).
Heat transfer between the air and the glass will be at a rate that is proportional to their temperature difference (everything else being equal). This will result in less condensation (and more evaporation) while the glass is at a temperature above equilibrium.
We would expect the glass in the sunlit experiment to reach equilibrium sooner than the one in the shaded experiment.
Now you have a case where the evaporation from radiation may be offset by this thermal equilibration process of the iced water.
If you were to integrate the net condensation over the 30 minute time of the experiment, you would see that the sunlit glass might actually produce more condensation.