I've tried co-working but once you add in your own chair and monitor (ergonomics) and eavesdropping-proof location (security) and taking the laptop home at night (security) and on top of all that having a commute again, it's kind of a pain.
I will probably eventually rent my own office (at my own expense) near where some friends work, but that's a pretty expensive way to guarantee social interactions.
I'd be curious what else you've come up with.
Here's how I stayed social. First, I used the time you would spend commuting or going out to lunch to get non-work chores done. I'd do laundry in the morning when I'd otherwise be in the car. I cut the grass or worked out during lunch, etc. I'd already be fixing dinner during everyone else's evening drive time.
That freed up my weekday evenings to be social, since I wasn't in after work commute-cook-chores hell.
I'd spend time at programming language groups; taking classes related to hobbies (brewing, a little woodworking); going out with friends to nice restaurants on Wednesdays when they weren't crowded; and doing some social volunteering. I got involved in running a couple of software conferences and joined a wine-and-movies social club.
I found—since I am a "gregarious introvert"—that not having to be around coworkers all day left me more energized to socialize with friends and family in the evenings.
And instead of a social circle dominated by coworkers, I have one that provides interactions with people from all walks of life, and have friends scattered around the globe to visit when I retire.
If you plan well and work at it, you can be more social working from home.
A co-working space gives you the option to have a social work space, but you get to choose each day (and even each hour) if that's what you want.
I think they other advantage is in a commute. You have many more options about where you want to be co-working than you do about where your company's location is. If your company is across town from you residence, and you have an hour commute you could find a co-working space that is closer to home.
If you ever have to be a remote worker in the future, I'd highly recommend getting a co-working space as it really helps fulfill a ton of those social needs. Your employer might even pay for some (or all) of the costs associated.