why do coke cans get moisture on the outside when they are taken out of the fridge

Air can hold much less water in vapor form when it is cold. The rest of the water must condense out as dew or frost on surfaces or (in the air) as clouds or rain. The cold surface of a can of soda pop (or anything else)is a place where the cold air that touches it can release its moisture.