They treat Boo Radley unfairly in much the same way "Big Bad John" was treated in the famous ballad. In the ballad, an imposing, but shy man named John moves into town and works at the coal mine. There are rumors about his past insinuating that he accidentally killed a man in New Orleans in a brawl. Then when a cave-in occurs at the mine, John saves 20 men at the cost of his own life. The memorial placed at the site dropped the word "Bad" from his name. He was simply known as Big John.
Boo Radley is treated much the same way. Not much is known about him, he's very quiet and shy, but he really does care about Scout and Jem, especially when he came to their aid when Mr. Ewell attacked them. Because Boo is reclusive, people make unfounded assumptions about him.
Tom Robinson is the victim of more overt discrimination. Because he is black, he's a tempting scapegoat in Depression era Southeast USA. Mr. Ewell is clearly a bigot, and one whose bigotry is apparently shared by most of the town at that; the jury still found Tom guilty, even though the evidence seemed to indicate that Mr. Ewell (who is left-handed, and abusive) beat his daughter.