A musty AC smell is from mold growing in your system, usually because the AC drain is clogged. Make sure your car drips water under it when stationary w/ the AC running, if not, unclog the drain tube.
To prevent it, turn off your AC a mile or two before your destination to allow the evaporator to warm up, preventing condensation.
If you already have mold, you can remove and clean all the ductwork and the evaporator (a lot of work), or you can buy one of the aftermarket spray chemicals which you spray into the ducts and this spray kills any fungus, mold or bacteria in the system, usually over several treatments.
Wurth makes one (
http://www.superiorcarcare.net/w893540.html ) and so does Wynn. They're about $20/can, but well worth it if the alternative is dismantling and cleaning the entire system.