There is no overriding legal authority to define what a microbrewery is or isn't.
However, if a brewery produces in excess of 2 million barrels(!), the first 60,000 barrels are taxed by the Feds at a lower rate (thus covering most regional/local/craft/microbreweries). As of 2006, the small brewers federal tax exemption was $7 per barrel, while the standard excise tax rate was $18 per barrel.
A beer barrel is 31 gallons, the equivalent of 13.78 cases of 24 12-ounce bottles each. As such, beer is not sold in barrels. The term is simply a unit of measure used for production and tax determination purposes. Thus, a barrel is not a keg.
Kegs themselves come in various sizes. The standard US-size keg is 15.5 gallons which is one half-barrel. The European standard is 50-liters which is 13.195 US gallons. A smaller keg becoming popular in the US is the approximately 1/6 barrel keg which is exactly 20-liters or approximately 5.278 US gallons.
The Brewers Association, a lobbying and trade organization for small US breweries, somewhat arbitrarily defines a microbrewery as producing less that 15,000 barrels annually. But the Brewers Association's definition of a regional brewery - as producing between 15,000 and 2 million barrels annually - does have more of a basis, since the US tax code, as stated above, creates an exemption for breweries producing under 2 million barrels.
Here's how the Brewers Association defines a craft brewery:
An American craft brewer is small, independent, and traditional. Craft beer comes only from a craft brewer.I note with interest the delineation of traditional, which appears to have been changed within the last year. Previously, craft was stated to exclude any breweries using adjuncts for any purpose. Under that definition, however, wheat and invert sugar were not considered proscribed adjuncts.
Small = annual production of beer less than 2 million barrels. Beer production is attributed to a brewer according to the rules of alternating proprietorships. Flavored malt beverages are not considered beer for purposes of this definition.
Independent = Less than 25% of the craft brewery is owned or controlled (or equivalent economic interest) by an alcoholic beverage industry member who is not themselves a craft brewer.
Traditional = A brewer who has either an all malt flagship (the beer which represents the
greatest volume among that brewers brands) or has at least 50% of its volume in either all malt beers or in beers which use adjuncts to enhance rather than lighten flavor.