It does sound like you might be having issues with either your network connection or your profile (Win7 profile), or even the application itself.
Have you tried to install a different version of Yahoo Messenger? Is it the most up to date?
I do think you might want to try another program like Trillian or Pidgin to test and see if it's the application (yahoo messenger) or not.
You could do something like a continuous ping to servers on the internet (start, run, cmd...at the command prompt type ping and the ip address (4.2.2.2 is a good choice)) to see if you get any drops from your network connection.
If you want to get more advanced, you could certainly use wireshark to see if there are any packets dropping as well.