Liquid nitrogen aids in nanofabrication by providing the necessary low temperatures to control the deposition and etching processes at the nanoscale. This enables the creation of intricate and precise nanostructures essential for various nanotechnological applications.