I'm not sure if this applies to other or not, but when I upgraded to iOS 5 on my iPhone 3GS, somehow the Yahoo account on the phone got corrupted. It showed that Yahoo only supported "manual" and "fetch", but not "push". I ended up deleting my Yahoo account and recreating it. That was easier said than done since every time I tried to delete my Yahoo account off the phone, it would come back when I exited and went back into the accoutn screen. I finally managed to delete it by changing all the account default to iCloud (mail, contacts, calendar, everything). I could then delete my Yahoo account. When I readded it, push was active.
Note when I upgraded to my iPhone 4S, I used the 3GS's backup data and ran into the same problem and had to fix it there as well.
I'll mention that I have a number of "bad" emails in my Yahoo Mail account, ranging from October 12th through October 15th, but I had already moved them over to folders. I can read them in the iPhone's mail app, but using the web mail page results in an error that they can't be opened. Yahoo is currently investigating that.