This is a fairly common complaint. What causes it?
It is principally caused by the growth of bacteria on the AC evaporator and in the remains of any water (condensate) still sitting in the plastic box that surrounds the evaporator. In a mild case it smells similar to a fridge which is opened for the first time after several days. In a serious case it can smell a great deal stronger and was once described to me as being like 'cat's wee'. We all have different abilities in our sense of smell and what may be a slight annoyance to one person might be almost unbearable to another.
Firstly let me reassure you that contrary to what you may have heard elsewhere it is not possible to contract Legionnaires Disease from the AC in a car. Legionnella pneumophila are a problem only in the air conditioning systems of large buildings where they use chilled water to transmit the cooling from one part of the building to another. No vehicle uses any water to achieve the cooling.
Nevertheless it may be possible to contract slight throat infections from a poorly maintained car AC system. I haven't yet seen any definitive proof that this is possible but over the years a number of people I have spoken to are convinced that this has happened to them.
How do these bacteria appear in sufficient numbers to cause either a smell or a health problem? If the car's AC is working well then new condensate is appearing on the evaporator all the time and simply washes any existing bacteria off, collects in the tray beneath and then drips onto the road through the condensate pipe. But if the AC is scarcely working, usually due to low refrigerant charge, this condensate is not being produced and this small amount of water becomes polluted with bacteria, verdigris and every other nastiness there may be in the air and with fairly ideal breeding conditions in a warm damp place turns into a veritable soup which will probably pong to high heaven. Quite simply recharging the AC and bringing the condensate supply back to normal may wash this nastiness away and within a day or so may completely remove the unpleasant smells. Sometimes however perhaps due to the design of the evaporator the smell lingers a little. Rather than trying to disguise it with scented products it is better to eliminate it altogether with a bacterial disinfectant in the form of an aerosol spray or better still an ultrasonically produced disinfecting mist which is circulated around the cabin, the vents, the ducting and the evaporator.
How to rid your car of these bacteria? Often simply recharging the system will cure the problem. If however the car has been recharged recently and yet the smell still persists then the problem is likely to be more deep seated and the system airways may need disinfecting. The cheap and easy method is to buy a specialist aerosol from a motor factor or accessory shop which will disinfect and deodorize the evaporator, just follow the instructions on the can. Perhaps the best method for stubborn cases is the fine mist deodorizer produced by an ultrasonic piezo device. This bit of kit is too expensive for the average car owner to consider owning but cleaning using this or similar equipment is often offered as a service by AC professionals