Some people claim that working as an independent researcher is more useful than collaborating with others, since you will be the star in that field and maybe get more funds. Others disagree, and think that collaborating and publishing more is more useful. What are the advantages and disadvantages of both approaches and which one is more beneficial?
I'm trying to coin a phrase: interior point maximum. Well, the phrase already exists: it means that the function you are trying to maximize which is defined on some closed, bounded interval [a,b] does not have its maximum value at either a or b but rather at some point c somewhere strictly in between.
Most functions one studies in calculus have interior point maxima, though there are obvious exceptions: especially if the function is increasing its maximum is at b, and if it is decreasing its maximum is at a. Perhaps this is because the methods of calculus only speak to interior point maxima: the basic observation is that if the function is differentiable, an interior maximum must occur at a stationary point, i.e., for which the instantaneous rate of change is zero. (Famously, the converse is not true.)
What's the point of this math lesson? It's this: when we step outside of math class we tend to completely forget about this phenomenon and try to stare off into space and figure out which of the two extreme points, a and b, is better. But in many real-world situations it is actually pretty obvious that the maximum must be at an interior point.
To me at least, the current question is a case of this.
If you never collaborate, then you never benefit from anyone else's expertise. In research we almost never do exactly what we want: rather we collect various pieces of what we want to do, and then have to make hard choices about how and when to combine those pieces into published work. If you can find someone else whose pieces are complementary to your pieces, then you both benefit tremendously form collaboration, because academia (justly) rates complete solutions more than twice as highly as half solutions. This is, to me, the best argument for collaboration, and it already shows that "no collaboration" is not going to be your optimal choice.
Another argument for collaboration, not nearly as good, is that it allows you to increase your multiplicity: in a given year, maybe you can write one paper all by yourself, or maybe you can write one fourth of four papers and put your name on all of them. In some academic cultures, depending upon how you play it, you will get more credit with the second option. However, there is no inherent advantage to this -- in other words, there is no added value to those outside your circle of collaborators -- so this is really rather specious. (But it works, to a certain extent...unfortunately.)
Another legitimate benefit of collaboration is that your collaborators get to know you and know your skills. I have several collaborators that don't write as many papers as I do and are perhaps not as high-profile in the community as I am. I wouldn't have thought they were anything special if I hadn't worked with them -- worked with them because they brought to the table key pieces that I could use to advance my work. Whenever anyone asks me about these people, I say how great they are.
If you always collaborate, then people begin to wonder whether you can in fact write a paper / complete an experiment / do one unit of substantial academic work by yourself. If you always collaborate with the same people, and especially if they are more senior than you and/or have other papers without you, then a lot of hard-nosed academics [including me] are going to suspect that you are not the brains of the operation and eventually wonder whether you may not have been gifted coauthorship. The details of this must be entirely field dependent, but I am in a field in which senior people usually don't get added as coauthors unless their intellectual contribution was decisive [in many cases, this means most decisive], so if I see someone with a sequence of strong papers all of which are joint with their eminent thesis advisor and no others, then I really need to hear their thesis advisor describe specifically and cogently the value added by their student. (In some fields collaboration is not an option, it's a reality. But this seems to nullify the question: if a = b, you can maximize the function.)
So it seems clear that it's an interior point maximum: it will be best for your research if you collaborate x% of the time for some 0 < x < 100. As with all interior maxima, one way to figure out x is: take a rough guess as to what you think a good value of x would be, and then explore the nearby space. Definitely do at least one collaborative work and at least one solo work and then evaluate how they went. At the risk of ruining my meme, I will say though that in this case the amount of collaboration is less important -- if you make it safely between 0 and 100% -- than the type of collaboration. As above, you want to choose collaborations that qualitatively augment your work. You do not want to "trade papers" or get involved in projects just to have your name on one more paper. Definitely make sure that you are bringing something to the table whenever you collaborate: you really don't want people wondering whether you've added anything of value.
If it is being cited you are looking for, then research has found the number of authors is positivly correlated with the number of citations (e.g. here, here, and here). There are ceveral possible reasons for this mention in literature, amongst them increased quality, easier introduction to a larger network of scholars etc.
However, do not use gift authorship to increase your numbers, but use real collaboration.
Beneficial for what? There's isn't a universal scale of benefit on which all activities can or should be compared. Instead, there are many different factors you need to weigh. Here are a few:
Can the group accomplish more together than working separately? (For example, if two people are trying to do the same thing, then competing can waste effort. If they have complementary skills, then collaboration can be even more fruitful.) If so, then society may benefit from the collaboration.
Will the collaboration personally help you, for example by teaching you new skills or giving you more visibility? This is a different question from the utilitarian question of whether society is better off as a whole. Your own interests don't always align perfectly with society's.
How will the community award credit? Collaborating with a famous, brilliant researcher might get your name on some excellent papers, but it wouldn't look nearly as impressive as writing the same papers on your own. On the other hand, writing excellent papers with a collaborator may look better than writing merely good papers on your own. This depends heavily on the situation, and there's no simple criterion.
What's your personal working style? Some people enjoy collaboration for its own sake, as a social activity, while others prefer to work by themselves. You may be happier and more productive if you choose the approach that fits you better, regardless of what other people say works for them.
Ultimately, nobody can tell you when you should collaborate and when you should work independently. You need to figure out which factors you consider most important and how they apply to your personal circumstances.