CGI programs can be implemented using any programming language able to write to standard output - this output is what is sent to the user's browser.
Typically, CGI is used on server platforms where JavaScript, COM or similar technologies are not available.
Any skilled console application developer is capable of writing good CGI.