Is there a way to set up Thunderbird to send emails to a certain folder based on the email address?
So for instance, I have the folder ME 040. I want all student emails to go to this folder.
Yes, see Message Filters in the MozillaZine Knowledge Base which has a link to a step-by-step tutorial on setting up filters.
You can do this in thunderbird (Thunderbird is a power full MUA), first create a folder:
Right click on your E-Mail address (At left column) -> New Folder... -> Choose a name -> Create Folder.
Now from top menu go to Message -> Create Filter on Message.... In this window you can create your rules.
Addition to other answers.
You can also create a search folder, so messages would be kept in the main folder, but this search folder ("saved search") will update automatically.
In this article you will find how to do this.
Using saved searches allows to "keep" one message in many folders (although that in reality they are stored in one place, so removing it will destroy it also from search folders).
message filter
viz kb.mozillazine.org/Filters_%28Thunderbird%29martineau's
answer.