Dill and Tom Robinson are similar in that they are both disenfranchised. Neither has any power in society. As a child, Dill is at the mercy of his parents. As a black man, Tom is at the mercy of whites.
Dill leads an elaborate fantasy life to cover up the fact that he is unwanted in his family. His father is gone, and his mother remarried and does not have time for him. His only refuge is Maycomb in the summer with the Finches.
Tom Robinson is a kind man who helped Mayella. His biggest crime was feeling sorry for her when he saw how she was treated. This was unacceptable in his society, because blacks were supposed to be inferior to whites and by feeling sorry for her he raised himself above her. Once accused, there is nothing Tom can do. Even though he physically could not have committed the crime, he knows he will be convicted because it is considered improper for a white woman and a black man to have a relationship.