>> An external drive to which you can back up your data
1. Find Your Profile Folder
First, connect your external drive to your Mac. Then quit Thunderbird and switch to the Finder. While holding the Option key, select Go in the Menu Bar, then click Library.
2. Copy Your Profile
In the resulting Finder window, navigate to Library>Thunderbird>Profiles.
Inside you’ll find your profile folder, named xxxxxxxx.default (where “xxxxxxxx” is a string of characters unique to your profile in this installation of Thunderbird). Drag the profile folder to your external drive to make a copy of it, then eject the drive.
3. Transplant Your Copied Profile Data
Reconnect the drive to your new Mac or a new installation of OS X, then launch Thunderbird and ignore the prompt to create a new account. This will create a new profile folder in the same location as the old one in your previous Home folder.
Quit Thunderbird, then navigate to Library > Thunderbird > Profiles. Note that the new profile folder has a different name than the one you backed up, and it already has files inside it. Select these files and drag them to the trash, but be sure not to remove the new profile folder (its default name is important). Select the files inside the original profile folder on your external drive, then drag them into the new, empty profile folder you just created.
When the data is copied, relaunch Thunderbird and pat yourself on the back. You’ll find your old mail and accounts just as you left them.