In a recent interview of Charles Bamforth on Chow.com, the professor of Malting and Brewing Sciences [This exists!?!] at UC Davis explains how best to order beer.
The best beer is locally brewed, poured from a fresh keg whose lines are cleaned nightly.
That's because the beer has traveled less, which means it was brewed more recently; an untapped keg is less likely to be stale; and cleaning the lines reduces chance of bacterial infection which can alter taste.
Second choice? Any beer on tap, where the lines are cleaned nightly.
Never order imported beer, because you don't know how long it took to travel from the country of origin to your country of drinking.
Even cans aren't necessarily to be frown upon. Cans can seal more air-tight than bottles, and the metal protects the brew from light which can degrade the volatile chemicals which make beer so flavorful.
His whole interview is worth a read, go check it out.