I am getting rather low battery life when using auto-sync on 3G. I have wifi in college and at home, so I'm looking for a way to enable auto sync only when connected to those 2 specific wifi networks.
That's easily accomplished using Tasker. If you don't know, Tasker is the most complete automation solution for Android. It doesn't come for free (5 Euro -- but you can get a free trial on their homepage), but is definitly worth the price. Just take a look at the Tasker UserGuide for a full description.
Tasker combines conditions and tasks to profiles. In your case, the Task would be something like:
You will have two Conditions, one for each profile (Tasker always connects conditions by AND, so you need two different profiles:
Now, when you're not connected to any of these networks, switch off AutoSync manually once (you won't have to repeat this). Next time you connect to one of the two networks, Tasker turns AutoSync on -- and resets it to the previous state (off) as soon as you are disconnected.
If Tasker is too heavy for you, I'm pretty sure there are other automating tools which can accomplish this simple task (Llama - Location Profiles for example). But now that you've got the idea, you will find the related app fitting you.