I've had a couple of good forums quit on me, because the top-level maintainer seems to have stopped paying attention. They had a useful set of mid-level moderators keeping it all going, but something (whether the base iron, the domain renewel, some other subscription element or a vital security patch[1]) rendered them as powerless to resolve as any standard user.
Then there was fora.xkcd.com (fan run, though officially piggy-backing off the original xkcd.com domain) which suffered a data breach a couple of years ago now, and was 'temporarily' offlined "while it was being sorted", though the message to this effect isn't there any more - it seems they let the subdomains and or hosts involved expire. But it was a good place to read, seemingly a good quality userbase and much interesting content. If they've move elsewhere, I haven't seen it yet.
So, first of all, a good forum needs someone who isn't going to abandon it to an unadministratable mess (noting that, awkward hack aside, I can't blame anyone for not being able to put the cat back in the bag and seemingly giving up).
Good forums don't need to be busy (B12 is too busy for me, I can't read everything I later wish I might) but obviously needs to sustain interest.
Good forums should be tolerant of subject-drift (not immediately ban someone for doing so[2]), without there being anarchy.
It helps if there's an on-primary-topic/off-primary-topic delineation, if there's a clear primary topic (which there usually is), like the upper/lower-forums on here; else a secondary 'chat' off each main subject. That's where the pure anarchy gets drip fed into.
....
You know, all the above is nothing (barring the functional continuation bits), without it just being a good group of like-minded members. Not utterly like-minded, but within any reasonable tolerance to not risk factions who grow to absolutely hate each other. And that's hard to prevent by technical setup alone.
[1] This latter is the only thing I vaguely worry about under Bay12Forums, save for the possibility of Author Existence Failure.
[2] True story, as an extreme of this I registered to a forum for an application a while ago with an eventual eye to discussing some aesthetic changes in line with other messages. They had a rule saying "Do not ask for help with XP, we don't support that!", which didn't seem to me to mean I shouldn't say that I was successfully running it on XP, in a casual context. Next thing you know, the post vanishes, then all the several posts I'd made vanished, then the session login fails. The only justification I got when I tried to check was that I'd "asked for help with XP", and thus seemingly got auto-banned (or semi-auto, as there was clearly a twitchy mod on a keyboard rather than just a pure regexp-inna-script - though it's possible the regexp mail-alerted the zealous moderator to release the ton of bricks I had drop on me) far quicker than any Escaped Lunatic on here who posts flagrant links to Viagra.