Organize and only store clean clothes in the closet. Maintain space between the clothing -- especially wet clothing -- and items in the closet to allow for good air flow. Also, soiled clothing, according to University of Missouri, is more likely to mildew than clean clothes. In addition, during the winter, keep items from touching exterior walls. This is where excess moisture tends to form, especially in unheated closets.
Invest in a dehumidifier. Several small dehumidifiers are available at home improvement stores and where small appliances are sold. Some dehumidifiers are labeled specifically for closets. Empty and clean your dehumidifier regularly as instructed in the user's manual to prevent mold from growing in the unit and from shutting off because it has a full tank.
Keep the closet door open, especially when you're hanging wet clothing and during cold weather when humidity levels in unheated closets tend to be higher. Set up a fan also to blow air into the closet.
Place desiccants, which absorb moisture, in your closets. You can hang them in cloth bags or set them on the shelves. Silica gel is an example of a desiccant. They are small packets that absorb moisture and are commonly found in a box of new shoes or bottles of pills. You can also use clay kitty litter or dehumidifier packs typically available where boating supplies are sold.