Warm air holds more moisture than cold air. The same moisture level (lbs of water per volume air) results in higher relative humidity levels in cool air than warm air. As a result if humidity levels outside are 90% as can happen in the midwest, when that moisture laden air hits the basement at 70 degrees the humidity can actually exceed 100% or as you know, it condenses and forms visible moisture.

Same principle on your water pipes. Warm moisture laden air hits the cold pipes and condenses. In an air conditioning system, air is rapidly cooled, and will condense moisture as a result. The circulated air therefore has lower moisture levels than what was drawn in. Humidity or moisture in air is present as a vapor and neither rises or sinks (hydrogen and oxygen in vapor state). Think of how many thousands of gallons of water are floating above your head when a cloud goes over. Of course when it condenses (cools) it has a significantly greater mass than the atmospheric air and will fall as water.