If your home has a heated basement, it’s tempting to insulate the foundation walls to make a home more energy efficient. But insulating and finishing a basement, especially if it is built in moist ground, is risky. Many homes suffer from mold and mildew because of their damp basements. If the basement walls aren't insulated and finished, it is easier to keep the basement dry and to avoid moisture damage.
The most common way to insulate a basement is by building a framed wall, filling it with fiberglass batts, and covering it with drywall. This unfortunately creates a cavity that is difficult to air seal and difficult to dry if the basement wall ever gets wet. Polystyrene insulation, equipped with imbedded wood fastening strips, is a better choice because moist air can't circulate behind the insulation as it can with the stud wall, and it will dry quickly if water enters through the foundation wall. Foundations can also be insulated on the outside during construction by using water-resistant insulation like extruded polystyrene sheets.
In any case, remove any causes of foundation moisture problems – for example, by installing gutters or sloping the ground away from the home – before insulating the basement. If you can't remove the source of water, don't insulate.
If you insulate your foundation wall, you should also insulate the rim joist (where the floor joists rest on the foundation) at the same time. Although fiberglass is most commonly used to insulate the rim joist, foam is better because moisture sometimes migrates behind the fiberglass and condenses on the cold rim joist, causing damage from mold or rot. Spraying polyurethane foam in the rim-joist area is now a common practice.