You may have exceeded the maximum number of connections to this server.
The default number of maximum allowed IMAP connections in Mozilla Thunderbird is set to 5. Depending on the specific IMAP configuration on the server hosting your account, this may result in the following error message:
Unable to connect to your IMAP server. You may have exceeded the maximum number of connections to this server. If so, use the Advanced IMAP Server Settings dialog to reduce the number of cached connections.
The solution is to reduce the maximum number of connections in Thunderbird. This can be done from Edit > Account Settings > Server Settings (under the mail account for which the setting should be modified) > Advanced > Maximum Number of server connections to cache.
Change the maximum number from 5 to 1 and the issue should be resolved.