Lifehacker.com has a great post on setting up Thunderbird for use with GMail as an IMAP server and using the Webmail addin to access Yahoo, Hotmail and AOL e-mail. Make sure to read the comments. There is some great information in there as well.
Read Turn Thunderbird into the Ultimate Gmail IMAP Client. I updated my setup based on information in this article. When I first started using Gmail IMAP in Thunderbird, I followed the instructions on the Gmail help screens, but noticed some new labels in Gmail. They were [IMAP]/Inbox and [IMAP]/Sent. I wouldn’t have minded, but the messages I sent with Thunderbird were not appearing in the “Sent” folder; instead, they were being labeled “[IMAP]/Sent”. I followed the Lifehacker advice and now only have one “Sent” folder*.
*Gmail really only has one great big folder and applies the labels “Inbox”, “Sent” or “Trash”. When you click on the “Sent” or “Trash”, Gmail displays only the messages that have that Label.
I don’t access my Yahoo or AOL mail accounts very often, but it appears that you can use the WebMail addin for Thunderbird to access them all. I haven’t tried it yet, but it looks interesting.