If you've ever been confused about the difference between an air barrier, a vapor barrier or weather resistive barrier (WRB), join the club. What on earth is a WRB anyhow? We used to call it house wrap, and before that tar paper (or building paper), but then there got to be so many other options, that a new term was needed, and hence WRB (or weather barrier), meaning that its something that keeps out wind driven rain, and acts as a backup for the siding/roofing.
So far nothing confusing yet. When Tyvek first came out, it was sold as an air barrier even though really it was a WRB, but these days we don't think of it as an air barrier. Sure its better than no house wrap, but the fact is the wind blows right thru the joints. We used to tolerate some air, but no longer, so forget about housewrap of any kind being an air barrier unless you somehow seal the joints (tape or otherwise. All that happened here is that our definition of "air barrier" changed.
Originally air barriers were thought of as reducing air infiltration, and hence saving energy. The the problem of moisture appeared--it turned out all that air movement tended to bring moisture with it, and when the moisture slowed down enough on it path in/out and hit a cool enough surface, it condensed, and voila, there was mold. So the concept essentially changed from reducing air flow to essentially eliminating it--at least the part that could cause mold.
Air barriers are often not a single product, but more of a technique using some combination of caulk, gaskets and spray foam applied everywhere there was a joint--or more likely at only the obvious places. Mostly these were done against the sheathing somehow, but some attempted to do something called "air tight drywall", which meant that every hole in the drywall had to be sealed somehow, the drywall had to be sealed to the sill plate, and the sill plate itself sealed, and of course that still left a leaky floor to deal with. Air tight drywall is tedious, hard to get right, and if years later someone punches a new hole in the drywall and doesn't seal it--well its not airtight drywall anymore. Needless to say, the method never got terribly popular.
As the market for energy efficient building expanded, so did the number of products on the market, and you might expect some of those products performed more than one function.
In all three cases, each product is both a WRB and an air barrier.
So if it sits under the siding or roofing, and is a secondary water barrier its a WRB. If something has all of its joints completely sealed, then its also an air barrier--although air barriers tend to be more of a multi-component system than one product.
Where things get confusing is vapor barriers, and a great deal of that confusion is because most of the "vapor" movement in a building is really a part of air movement. Water vapor, being a gas, will also diffuse thru many materials, including most common building materials. While that movement is significantly slower than when water vapor moves along with air, over the course of a season, vapor diffusion can still cause problems. When mold problems first started cropping up, vapor barriers were the first solution, but we now know that vapor barriers can also be a problem.
What exactly is a vapor barrier anyhow? As it turns out not many materials are actual vapor barriers, meaning they stop virtually all vapor diffusion. True barriers are materials like glass, metal and polyethylene sheets More commonly, materials are actually vapor retarders, meaning they slow vapor movement down, but don't completely eliminate it. Examples of these are wood, drywall, most foam insulations, tar paper, and some housewraps, although most housewraps are very vapor permeable. Then a few materials are vapor open, meaning they do little so slow vapor transmission. Fiberglass insulation would be an example of that.
Experience shows that the problem with an actual vapor barrier is that if any water does get in the wall, it potentially can't get out. Given that nothing is perfect we tend to lean toward building assemblies that not only don't get wet, but have at least some potential to dry out if they do, although that drying is somewhat limited by climate. Hence its not just a matter of keeping vapor out, but of letting it escape if it gets in, and so when a vapor barrier is installed, it is usually only on one side of the assembly--the wet (warm) side.
So the question of "do you need a vapor barrier" becomes two questions: (1) do you need an additional vapor retarder, and if so should it be a vapor barrier instead (2) if the assembly already contains a vapor retarder/barrier, do you need to take steps to prevent condensation on that surface.
While most building codes often answer the first question with "yes", the real answer is more likely only "maybe". As for the second question, the likely answer is "yes", but of course both questions heavily depend on the situation. This is covered in more detail in the vapor barrier discussion.
The summary is that many building materials are already vapor retarders so when someone talks about a vapor barrier/retarder, they're really referring to an additional one; we need to be careful about installing vapor barriers; builders need to think about drying as well a preventing wetting.
Notes
1: