Try this, may work...
Go into Control Panel,
Click on Network and Internet Connections,
Click on Windows Firewall,
In the General tab, make sure Dont allow exceptions is unchecked!
Click the Exceptions tab,
See if StarCraft is on the list you get,
If it is, make sure it is Checked,
If it is not, click on Add Program, and find StarCraft.exe,
Hit Ok
It should show up on the list, now make sure it is checked,
Run the game and see if it worked.
If all else fails, turn it off when you play SC. If it still doesn't work with the firewall off, then your router may be blocking it IF you use one. If you don't use a router, then the chances are that Bnet has banned your IP for some reason, too many login attempts with the wrong password is the most common.
If you are on a router, it is a little more complicated. If you are, let me know and I'll reply with a solution, since I go through a router I had to do it to make my SC work.