The basic principle here is that warmer air can hold more water vapor. Think of air like a sponge... warmer air can "hold" more water vapor because there are more spaces in between the air molecules due to the higher energy of the molecules. Remember that temperature is a measure of the amount of energy in a system. So, higher temperatures equal higher speeds. Thus, warm air molecules are farther apart than cold air molecules. Conversely, cold air cannot hold as much water vapor--that's why dew forms in the early morning, when air temperatures are at their lowest (at this time, the air cannot hold any more water vapor, so in a sense it gets "squeezed" out, just like a sponge that cannot hold any more water).
So, at 100 degrees F, air can hold 45.7 grams of water vapor. If the relative humidity is 50%, then 50% times 45.7 equals 22.8 grams of water vapor per cubic meter of air.