Change your pollen filter. Unless you've recently done this, in which case it might be mould or mildew in the evaporator. But usually it's the pollen filter. A lot of times this is the simple solution, believe it or not.
What you need to do to prevent this is to not use the recirculate button all the time. Depress this button to allow outside air to circulate through the ventilation system which will kill the mildew after awhile. Also, when you park your car, make sure the recirculate button is depressed so it can air out.
This happened to me with my first beetle because I always used the recirculate button and eventually it began to smell mildewy. The dealership had to run some chemical through which took like 2 hours to complete. But after that I did as I said above and had no problems from then on with that car or my new new beetle.
Another remedy would be to spray lysol disinfectant spray into the vents on the outside of the car just below the windshield (you can see them when the hood is lifted). Turn on the AC with the recirculate off and the spray will be sucked in and kill the mildew. It will also give your car a nice lemony smell too.