From Mozilla's Thunderbird FAQ:
"How do I export e-mail messages to another mail program or computer?
Thunderbird's mail files are in the standard plain text "mbox" format, which almost all mail programs can use or import. Many proprietary mail programs have a function to import from Eudora, which also uses the "mbox" format; this function should read your Mozilla mail files properly.
Your mail files are inside your profile (see the Profile Folder), in the Mail and (if you use IMAP) ImapMail folders. Each mail folder (Inbox, Sent, etc.) is stored as two files — one with no extension (e.g. INBOX), which is the mail file itself (in "mbox" format), and one with an .msf extension (e.g. INBOX.msf), which is the index (Mail Summary File) to the mail file. Tell the other program to import mail from the file with no extension.
If you want to transfer a mail file to another Mozilla profile or another installation of Mozilla, simply put the mail file into the other installation's Mail folder."
Profile folder info: