I second Kimball's excellent answer. In my opinion, collaboration is neither bad nor good in and of itself, it is simply a means to the end of producing good research. If you can produce good research by yourself, that's all that matters, and the fact (that many commenters here don't seem to appreciate) is that mathematics in one area where it is a lot more possible to produce good research by oneself relative to other sciences. In fact, some of the best research that can be done in math, the kind of groundbreaking research that is the product of very deep and intense thinking over long periods of time, has been done by people working by themselves (I'm looking at you, Perelman, Wiles, Yitang Zhang, Louis De Branges and many others). Indeed, I suspect that this may very well be the only way to produce certain kinds of breakthroughs.
With that said, setting aside the extreme examples I mentioned, for normal people in normal situations (and certainly for people at the pre-tenure-track job stage), there are some good reasons to think that collaborating with others can give a modest (or in some cases not so modest) boost to your productivity, and also increase the exposure of your work once it's finished:
In pure math research, the combined brainpower, talents and skills of two people is often more than the sum of its parts. No one person can be an expert on everything, and often research breakthroughs require putting together different ideas that few individuals could come up with all by themselves.
Working with others can give you new ideas and teach you new points of view and techniques. It has benefits that will stay with you long after the collaboration is over and can inform your work on the next project and make you a better mathematician.
Collaborating with others offers a very good way for others to learn about your abilities. If you leave a good impression, that can well help you down the road and also make many other people want to collaborate with you. This can seed a virtuous cycle (a.k.a. "the rich get richer") where people might approach you with exciting ideas for research projects that you would never have thought of yourself, amplifying and multiplying the effect of your initial successes.
Perhaps my favorite feature of collaborating, which seemed almost too good to be true when I realized it exists, is that when you finish a coauthored paper, you now have a person or persons who will spend the next few months or years traveling around the world giving talks about your result. Imagine that, someone working for you for free to go around telling others how great your result is and how great you are! (And keep in mind that they can, and sometimes will, praise you in ways that you could not politely praise yourself...). Of course, I assume you will do the same for them, but again, the result is that your paper can get double or triple the impact with the same amount of effort that you would have to put in for a solely authored paper. (You can also share with them the work of writing the paper, share slides and other "marketing" materials, etc. - the possibilities are endless.)
Finally, I should add that I personally enjoy working by myself slightly more than with others (I've done both about equally - around half my papers are solely authored), so you should not feel that there's anything wrong with you if that's your preferred mode of working. As long as you're doing good work, things should be fine. But as I explained above, you might want to give working with others a try and maybe discover some of the unexpected advantages it can give you.