Or, more accurately, it depends.
I try to balance the amount of independent and group work. Often the group work leads to something independent. I teach middle school. Developmentally, at that age interaction with peers is #1 on their priority list. To put 30+ in a small, crowded room and expect them not to interact is unrealistic, to say the least. So I give them time to interact...with content. It's also a good way, for most, to process that content anyway.
How I group them is entirely based on what we're doing, and what the point of the activity is. Sometimes I'll just have them work with the people who already sit at their table. Sometimes I'll ability group them, to allow me to provide extensions and extra help more efficiently. Sometimes I'll do my best to group them heterogeneously; in that case, the assignment is set up so that weaker students can learn from stronger, but can't depend on them to do their work or thinking for them. It's generally important that they get to hear others' thinking, and see the way others process information and go about completing a task. It adds to their experience and skill set.
Sometimes, I'll tell them how many people I want in a group, give them 20 seconds, and then step in to clean things up. I'll say something like: "You can choose your own groups today. No more than 3 people in a group. If I think you've made a wise choice, your group is good to go. If not, I'll change it, only the change will be my choice. I'll adjust the groups when the 20 seconds is up. Go." 20 seconds seems to be a good span of time so that nobody has to feel rejected if they haven't found a group; there is always going to be a group of 4 or 5 who can't bring themselves to separate, so I do it for them and even everything off. After once or twice, they get pretty good at grouping efficiently, and still feeling like they had a choice. Choice is important to them.
In addition to the reasons given above, working in groups allows me to circulate, stopping at 5-10 groups instead of 30+ individuals; by the time I get there, they've talked things out, helped each other, and are ready with what they need from me to proceed. It also gives them the opportunity to develop the skills needed to work cooperatively with others, which is a life-long skill needed to be successful in most arenas.
The structure and climate of my school lends itself to good working relationships. We're small, I have all of my students for some part of their day for a full 3 years, and they are with each other for those 3 years. We spend a lot of time building positive working relationships. While they are still middle school students, and still have the general developmental social, emotional, and intellectual issues, we have stronger community relationships than the average large, institutional middle school.
All of that said, they still have to be able to demonstrate learning independently, and they know that.