I've worked as a developer for about 12+ years, then as a product/project manager for about 4 years. As a developer, I worked about half that time in soft-walled cubicles of various heights and another half in open office environments. I spent a year or so in a shared walled office. As a project guy, I spent about 3 years in an open office and 1 in a shared walled office (2people).
With my dev lead and project management hats on, open offices wins hands down. Whenever I want I can stand up and do a quick and dirty eyeball scan of the office and gauge who's deep in thought and shouldn't be disturbed, who maybe needs help with something, who's picking their nose on Facebook. Project goals, milestones, etc. can be on prominent display on the walls, so everyone can easily reference them--no more "oh, I didn't know we were releasing next Monday" excuses. Whiteboards all over the place so people can get up and do a quick informal collaboration, then visually reference it later from their desks. Everyone sees everyone all day, bringing an extra bit of team unity, nobody gets to hidey-hole in their office, pretending to not be part of a team. Daily stand-up meeting is quick to set up and painless, it takes a minute for everyone to just get up and walk over to the scrum corner, as opposed to having to lose 10 minutes every time waiting for everyone to decide to come out of their hiding holes. If I do have a quick question, I can tell if they're in the middle of something concentrating by just glancing over their way rather than having to knock on their office door (guaranteeing that I disturb them).
With my developer hat on, it's a bit of a toss up. I can appreciate the benefit of having a quiet, closed-in space to go deep on a problem. And open offices, while they can be quiet if you set basic etiquette rules, will never match the volume level in closed offices. But, in an open office, there's zero friction if someone needs to come chat about the code, collaborate, bounce ideas off me, and vice versa. I've never been offended when someone stopped by to discuss a problem they're having, or ask to review their approach or code. Sure, it gets you out of "the zone" a bit, but you just get back into it. The whole business about having to waste an hour to get back into the zone after an interruption is, frankly, total BS. One thing I'll say though, is the cubicles are the worst of both worlds: You have the noise level of an open office combined with the high-friction human interaction, collaboration that's limited to online tools, and hidey-hole mentality. I'd take either option over a cubicle any day.
I think my ideal office environment is open offices for everyone, but with small private workrooms here and there that people can reserve in 2hr blocks or so, where they can go away into if they really need that occasional alone time to get the job done.