NaCl stabilizes the the double helical structure of DNA. It also provides Na+ that neutralise the negative charge present on DNA. Due to the negative charge the DNA molecules repell each other. When the charge is neutralized the DNA molecule come together and could be precipitated.