I recently updated my iPhone 4 to the latest version of iOS, namely 5.1 in this case. Although the update went fine with no issues (I updated directly on the phone), I started having problems the next day when I tried to apply an update to one of my apps and the app was stuck on waiting.
In the past when this issue has popped up, the solution was often to tap on the app to pause it and then tap it again to resume the download or switch to another wireless network, which allowed things to get unstuck and start moving again. For the more stubborn apps, a reboot sorted it.
So when I had this problem again I wasn't worried and simply repeated all of the steps above except that this time none of them worked. Some Googling revealed that powering off and then on again could also do it or going into settings and resetting the network settings but these didn't work for me either. At this point the only way that I could install apps was to tether the phone to the computer and run the installations or updates in iTunes and then sync them over to the phone, which is a nuisance to say the least and definitely not the post-pc future that's written about.
I found a solution that worked for me though but unfortunately it takes a couple of hours and involves resetting your phone. Heres what I did.
1) Connect the phone to the computer and in iTunes made a local backup (perhaps this would work over iCloud but I thought local would be faster).
NB: Encrypt the backup! This way all of your passwords and settings are saved and restored later, if you don't encrypt it, you will have to re-enter them.
2) Once the backup is complete, restore the phone back to the factory settings by clicking on the restore button in iTunes
3) After it has restarted and re-installed the firmware, iTunes will recognise that the phone is connected and offer to restore your backup, confirm that you'd like to restore it.
4) Once iTunes completes the restoration of your backup file, wait, don't disconnect it just yet. The phone will connect to iTunes once more and start to copy all of your apps, folders and songs back over, just let it run and when it's finished it should be back to the state it was in at the start.
In my case with a 32GB iPhone 4, this took around 2.5 hours total and afterwards I had a working phone again.
Hope this helps.