While beer that is properly sealed and not infected will not go bad, per se, it will eventually peak in flavor and begin to decline eventually. Just when that will be depends on the conditions you are aging it under, and the strength of the original beer. I've had a homebrewed pilsner that was 15+ years old and was still quite good, but that's an exception I would guess. A strong beer like an old ale or a barleywine can age for as long as 20 years, or so I understand.
Note that hop flavor and aroma dissipate in a few months in most cases, so if you have, say, an IPA or a Pils, you usually want to drink them young; the pilsner I mentioned had long since lost most of the hop character, making it more like a helles than a pilsner.