These smells are usually due to dirt, dust and debris buildup in the under-hood air intake vent, trapping water and moisture on the AC evaporator and in the evaporator case. All kinds of nasty gunk (germs, mold, mildew) can fester and grow in that wet, trapped debris.
How do I get the mildew smell out of my car air conditioner?
Spray an antiseptic into the exterior air vents (where your car pulls air from outside into the car from). Be sure your AC is set to the setting that pulls air from outside in, so that the spray is pulled into the ventilation system and can directly work at killing of mold and bacteria.