They peaked at the right time, and you had a prime Umar Gul, who was the highest wicket taker of the tournament, of course their was also Afridi, who came up the order and showed up for the semi-finals and finals. Amir bowling, and Younis Khan was a pretty good captain, Kamran Akmal also had a good tourney as well from what I recall
The first Pakistan Lost, against England, and they needed to win the next game to go to the next super 8s. Pak had to play Netherlands, and Netherlands won their previous match vs England. Pakistan did win, thankfully haha and were able to progress to the Super 8s.
In the super 8s, Pakistan was paired with Sri Lanka, New Zealand and Ireland. Pakistan lost the first Super 8 match, and I believe they replaced opener Salman Butt, with Shahzaib Hasan, and that helped and turned things around, Pakistan than went on to beat New Zealand and Ireland, booking a spot in the semi-finals, with South Africa, which Pakistan, and than winning the grand final in 2009 vs Sri Lanka
I think it is several factors, nothing really special but just doing the right things, at the right time
Brining in Shahzaib Hasan, Shahid Afridi coming up the order and have good all around performence in semi-finals and finals
Amir and Gul bowling in tandems, Razzaq as well who bowled great in the finals, Saeed Ajmal, Fawad Alam fielding, and Akmal having a decent tourney as well
Is it fair to point out the format, helped a bit as well, and 2 of Pakistans wins came agaisnt weaker sides (Ireland and Netherlands) but that being said Pakistan played well, and deserved to win the cup that year, I think everything just fell into place and Pakistan just played good cricket