Along with the version number, useful information about the set compile-time options and available windowing systems are shown. Certain things can be compiled in or out of the game; #version will show a list of all options compiled in. Within the options compiled in is a range of versions that save and bones files from the current version will be compatible with.
Depending on your settings, using the version command might display something like the following:
Windows NetHack Version 3.6.0 - last build Mon Dec 07 08:33:20 2015. (x86) Options compiled into this edition: color, data librarian, insurance files for recovering from crashes, exclusive lock on level 0 file, log file, news file, restore saved games via menu, screen clipping, screen control via WIN32 console I/O, user sounds, system configuration at run-time, save and bones files accepted from version 3.6.0 only, pattern matching via cppregex and basic NetHack features. Supported windowing systems: traditional tty-based graphics and mswin with a default of mswin.