Is it ethical of a professor to ask students for recommendation letters during a class? I am taking a graduate course with a non-tenured professor. During one of the sessions, the non-tenured professor told students that recommendation letters from them would be helpful and that they could be sent directly to the professor. This seems very unethical, given that class is not over yet and that the students have received few grades. Is something wrong here?
First of all, as a general rule there is not necessarily something wrong with a professor encouraging their students to provide feedback to the university about the professor’s teaching, including in the form of letters, if this is done in an appropriate way. For example, I regularly encourage my students to fill out teaching evaluation surveys at the end of the quarter, saying the feedback is very helpful for my department. Is that unethical? Well, no, because I don’t tell them what to write, don’t insinuate or imply that I am referring only to positive evaluations, or that some harm would come to those students who don’t follow my suggestion, and know that my students know that I have no way of knowing who filled out the survey, which is anonymous.

What is quite concerning in this case is that the professor requested that the letters be routed through them. That creates a real concern that the professor may only pass along letters with positive (or very positive) feedback to their department and withhold less positive ones. It also means the professor will know who wrote what about them (and who didn’t write anything), and gives them an opportunity to practice favoritism and/or retaliation based on this information, particularly since as you say the course is not over yet. 

To summarize, the way this was done  is certainly not the best practice for how such letters can be solicited, and would represent either extremely careless and thoughtless behavior on the professor’s part, or (which seems a bit more likely) outright unethical behavior. I might perceive it less or more seriously depending on various other factors, including the precise words and tone of voice the professor used when making their request, but you would certainly be quite reasonable in looking for ways to bring this up with officials at your department and/or university and express your discomfort to them.