From my understanding, it's written in Arc, a Lisp variant created by PG. The Wikipedia article on arc [0] lists some tutorials for creating a forum similar to HN.
The current version of Arc can be found at arclanguage.org, forum included, but HN itself runs a lot of proprietary code so the base version of the language and forum won't have feature parity with HN.
There is also Anarki[0], which is the public fork of Arc and the forum, which is very much not in feature parity with HN. Anyone who wants to contribute is welcome to.
[0][https://en.wikipedia.org/wiki/Arc_(programming_language)]