iTunes on Windows 7 loses connection to other iTunes or Apple TV 2

Your iTunes Library file might have been corrupted, a more frequent problem with the last iTunes update, especially if your computer turns off, on or restarts frequently (more then once a day).

Your exact problem happened to me 1, maybe 2 weeks back and after a bit of research on similar problems, I found that my iTunes Library file had been corrupted during a boot. All you have to do is rebuild the iTunes Library file as per Apple's instructions and it should be working perfectly again.