This answer pretty much sums up the best way to get it done. The server puts each message on the appropriate label but it remains in an unread state, so Thunderbird will pick up the hint and notify you of unread messages.

How do I synchronize Thunderbird tags with Gmail labels? – Super User