Debian Stretch comes with no XChat in the main repository. However, it is available in the stretch-backports repository.
To enable stretch-backports, edit the file
/etc/apt/sources.list and add:
deb http://ftp.debian.org/debian stretch-backports main
Then update the local apt registry and install:
apt-get update apt-get install xchat -t stretch-backports
Alternatively, there is HexChat that is a fork of XChat. HexChat is available in the main repository and can be installed by using the command:
apt-get install hexchat