Very broad question, so I’ll just focus on one aspect, and it’s the one small piece that I’ve found delivers the most bang for the buck regardless of the purpose or focus of the forum: you need a UI that is intuitive and minimizes barriers to participation.
Forums can be overwhelming. To encourage visitors to “use” the forum, it should be very clear how to search for content and how to navigate around the community to boards focused on specific topics. Simply reading the forum, consuming content, is how the vast majority of visitors will use a forum; a small percentage will ask a question or contribute once, and an even smaller percentage will become regular participants. So, make sure that it’s easy to consume content, because that’s the most important thing to the vast majority of your users.
In addition to intuitive navigation and search, don’t forget the basics of any website: ensure site performance is great (your pages have to load quickly); make sure your fonts and key page elements are adequately sized; and, these days, your forum must be easily and satisfyingly usable on mobile devices. These are just table stakes; gamification, community building, seeded content, etc., etc. — none of this is going to matter if your forum is hard to use.