I can guarantee to you that everyone who is working in isolation, especially when writing code, but with any and all kinds of work, believes, 100%, that they are doing much better than they actually are.
So, the first advantage you'll find (and I found) when starting to work with a team is actually a rather humbling one. Working with others, especially when they are talented, but even in the unusual circumstance where you are better than they are in every possible imaginable way, will, at first, highlight your own mistakes and weaknesses. If you are able and capable of taking criticisms well (even if they only come from your own observations of your work, as seen when working with others), the experience can be a good one.
This first benefit lasts - as you work more and more with teams, and with more and more people, you will continuously get more and better feedback about your mistakes - which you can then use to correct. You'll also receive positive feedback about successes, but, especially in the programming world, negative feedback prevails (no one opens up an "anti-bug" in the bug tracking system to tell they looked at your module and saw an especially nice algorithm implementation).
In the long term, there are other lessons you will learn, some of which are very difficult to learn in isolation:
- Writing legible code is difficult, especially when you're writing for other programmers, at different skill levels, to understand
- Writing code which others have to bug fix is difficult. Helping others to fix your bugs requires skills you may not have
- Project management is more important in a team, and activities you may not know about, or find useful, in isolation, become crucial in a team. Such as properly maintaining a clean release branch in CVS. Or testing code before checking in
- It's easier to learn new technologies when there's someone around to explain them to you, and answer your questions about them as you learn
- Interruptions are more frequent in a team, which can be both fun and frustrating. You'll learn how to switch contexts better when working with more teammates
- Working in a team often requires structure that's not existent when working solo - from activities such as code-reviews, to simple but not necessarily obvious things such as always being at work on time.
- It's easier to specialize very deeply when in a team, with trusty team-mates. You'll find that learning something, then teaching it to others, and then answering detailed questions about it (and solving related problems), especially when the people you deal with are other programmers, will push you to levels of skill and knowledge you were not aware of