Yes, it's quite safe to disconnect a hard drive. It won't affect it's contents.
Ordinarily, when installing Windows, it's always the best policy to disconnect all the other drives.
However, if your drive contains Windows and you want to be able to have a dual boot setup with another OS on a separate drive, you should not disconnect it. If Windows Setup can't detect an existing OS (because the drive has been disconnected) it can't set up your system for dual booting. You won't have a dual-boot menu, and without that you have no way of choosing which OS to run whenever you turn on your PC.