Well, I imagine spending four years fighting within the Order, getting married, and having a kid would have contributed to his growing up a bit.
Also, Lupin did mention that the mockery and pranks went both ways, Snape was hardly innocent. Considering the conflict not only between James and Snape, but between the Marauders and the future Death Eaters, it makes more sense.
Finally, face it, we were *all* fundamentally different people between the ages of 16 and 21. I wouldn't say I was fully mature at 21, but I was far better than I had been 5 years prior. We're all little twits in our own special ways at 16. Many of us are still twits at 21; some of us will be for life. But most of us outgrow the worst of it by the time we're 21.
Follow Mothering