To make a message board, you will more than likly want to code in CGI. That being said, CGI can be any language. First thing you need to think of is, "What system will be the web server for my message board?". If its your own system, then you will probably be running the OS of your choice, and could have the CGI in the language of your choice. If its someone elses system, like a service providers systems, then you will need to check to see what language you should use to code for your CGI. Most service providers systems are Unix/Linux based, and would therefor work best with Perl CGI.
If its your own system, ask yourself "What languages do i already know?". If you do not already know C++, i would learn it anyway. C++ is an excellent language to program anything in because of its OO status. Java is OO also, but you do not have the nice option of Inheritence, in which one Class can get certain characteristics from a Parent Class. This makes it nice if you want to have maybe a message board with different rooms (like this forum), so they could get certain characteristics from the main message board. Also C++, because of its ability to have Classes, allows you to reuse code many times in many different program.
To code CGI in C++, all you have to do is have your C++ program output HTML to the screen, and have your HTML webpage access to program as a link. Its a little more complex than that, but that is the basics of it.
Hope this helps