I found an interesting answer to a similar question on Reddit:
The main idea behind their power jump is that when the Strawhats first fought CP9, they were largely confused and unsure. All they wanted to do was get Robin back, and only attacked CP9 after they got in their way. Note that in the Galley-La mansion, Luffy tried to reason with Robin first, and only attacked Lucci twice: once to defend Paulie and afterwards while Robin was exiting the room. Zoro attacked Kaku only after Robin was leaving as well. It's the same with Sanji on the sea train; when he kicked Blueno, Sogeking was holding Robin. Sanji wasn't trying to beat Blueno, only make him let go of the kart.
Does that mean the three of them weren't going all out? In a sense, you could argue that: Why go all out on an opponent you don't even need to defeat? Would defeating them have gotten Robin back? Absolutely. But the Strawhats typically avoid conflict unless necessary; as evident by the fact that Luffy only states he'll kick someone's ass after he has a reason too.
I always saw two reasons behind the power jump. First, CP9 was the strongest group they had ever faced, and forced Luffy, Zoro, and Sanji to become stronger, which I'm sure definitely helped. However, the second reason is that, in order to get Robin back, they had to go through CP9. They couldn't talk to her like in the mansion, nor could they have kicked Blueno off the kart like on the train. Without defeating CP9, they couldn't get Robin back, and so they put everything they had into their battles because there was no other alternative.
A canonical reference is this:
Another point to be noted is that Luffy's new learned techniques of Gear Second and Gear Third make sense because he had been working on new techniques/moves after fighting Aokiji the first time, and Zoro's Asura can also be explained on the basis of the immense training he undergoes on a daily routine. Nami's learned techniques are mostly just various scientific uses of the perfected Clima Tact that she was given by Usopp.
After the events in Skypiea, Usopp upgraded the Clima-Tact into the Perfect Clima-Tact, which was first introduced when Nami and crew were trying to catch up to the Puffing Tom with the Rocket Man. With a better knowledge of Nami's preferences and a handful of Dials to spare, he changed the Clima-Tact from a party toy with a few combat capabilities into lethal weapon capable of amazing weather powers that only Nami could unleash. With this, Nami became fully capable of fighting on her own, and just as superhumanly powerful, in a sense, as any other crew member.