Finding a professor beforehand
Well, if you want to find a good professor to work with, you could search for the available professors in a certain university (online, in their website). 

After having all the names, you could "stalk" them online, find some of their papers, etc. Most of them (if not all) will have a webpage in which they post lots of information about themselves, such as, their papers, students they worked with, even their hobbies. You'll probably delete quite a few names that way.

You'll still have some professors names not crossed out. You can then try to e-mail the students they worked with and ask them what's their evaluation of said professor. 

Not sure if this is what you're looking for, sorry if it's not.