When I was in college the one professor who taught me the most, and especially the most that has helped my career, told me "publish, publish, publish!"
I didn't stay in academia, I've never had a peer-reviewed article in a major paper, but I've taken his advice to heart and it's served me well. I get my name out there as much as I can.
Back in the '90s, Ed Catmull, of Pixar fame, emailed me out of the blue on the basis of a discussion I participated in on comp.graphics.algorithms, and I went to work there for a while. That's my most dramatic episode of making a good contact online, but it's far from the only one.
I've had recruiters who actually knew what I was looking for contact me (rather than the usual annoyance of keyword matching on Dice), and they already knew what it would take to get me to move (One email started something like "I see you just bought a house in wine country, I can't imagine moving here is attractive, but the client told me to contact you anyway", which got my attention, because he cared enough to find out who I was. Even though "wine country" is a bit of a stretch... I suppose he was being nice).
I don't really like the social networking sites, and I rarely send invites because I feel like that's something of an imposition, but I gladly receive them because things that raise my visibility have, so far, been good for my career and my life.