In some light aircraft, like a Cessna 172, the pitot tube is heated but the exterior static port isn't. The usual reason I've heard is that static ports are much less susceptible to icing, but why is that the case?
You'll find your answer if you take a look at the form of a pitot tube or other kinds of ducts where pitot (or total) pressure is taken and compare it to the parts of the aerofoil where ice is prone to accumulate. Ice will most likely form on the leading edge of thin surfaces in the airstream but not on the side of the fuselage. If ice would built up there you will probably have some more urgent problems then switching to your alternate static source ;)
Some aircraft DO heat the static port, if only by side effect: Piper PA28 aircraft (Cherokee/Warrior/Archer/Arrow ) for example have the static port located on the pitot mast. When pitot heat is turned on in these aircraft the entire mast heats up, including the static port.
This characteristic would be the same on most aircraft with a combined pitot/static mast.
As for why most light aircraft don't heat the static port, there are two big reasons.
First, as you've heard, static ports are normally not located in areas susceptible to icing -- they're on the side of the fuselage in areas of relatively undisturbed air (on most of the Cessnas I'm familiar with they're forward of the doors, on other aircraft they're right around where the registration numbers get painted). As Falk pointed out this means ice normally won't accumulate there.
As an additional protection some aircraft have multiple external static ports (connected to a shared static line) so that if one port does get iced over you still have a source of reference pressure.
Second, a static failure is relatively easy to deal with - particularly in unpressurized light aircraft. Many unpressurized aircraft that are regularly flown in instrument conditions will have an alternate static source in the cabin (which is simply a valve that opens the static line to cabin air), or the traditional "break the VSI glass" solution can be used to get a mostly-working altimeter.
To perhaps be a bit more clear on the "why" question, the opening of pitot tubes must face into the windstream. By contrast, the opening of the static ports should be perpendicular to the wind stream. Since the water that causes ice accretion is generally moving with the air, it will be constantly hitting the pitot tube opening, but not hitting the static port opening (or not nearly as much, at least.)
It is not by coincidence that pitot tubes are generally in locations where ice will accrete while static ports usually aren't. It is instead a necessary consequence of each of them meeting their design goals.