There are actually too many ways in which Harper Lee shows the unjust treatment of Tom Robinson. So, I will name only three of them.
First, Lee portrays Tom in the most positive light. According to Atticus, Tom is a good man who lives a "clean" life. He attends Calpurnia's church, and Calpurnia vouches for him, as a good man. This last point is important, because Calprunia throughout the novel is a reliable judge of character. Based on this, it is clear that Tom is innocent.
Second, during the trial, it comes to light that Tom is crippled. This shows that Tom could not have beaten and attacked Mayella. Moreover, the testimony that we hear from him and his employer shows that he is a good man. For example, Tom often helped Mayella for free. Here is what Tom says during the trial:
“Mr. Finch, it was way last spring. I remember it because it was choppin‘ time and I had my hoe with me. I said I didn’t have nothin’ but this hoe, but she said she had a hatchet. She give me the hatchet and I broke up the chiffarobe. She said, ‘I reckon I’ll hafta give you a nickel, won’t I?’ an‘ I said, ’No ma’am, there ain’t no charge.‘ Then I went home. Mr. Finch, that was way last spring, way over a year ago.”
Based on these points, Tom is completely innocent. The only reason why he was found guilty is because he is a black man.
Finally, when we see Tom in contrast to Bob Ewell, the difference of the two men comes out most clearly. That the jury would find Bob innocent and Tom guilty is a travesty of justice.