In Chapter 10, Scout recalls the time Atticus told her that it is a sin to kill a mockingbird. She asks Miss Maudie about it and Miss Maudie replies:
“Mockingbirds don’t do one thing but make music for us to enjoy. They don’t eat up people’s gardens, don’t nest in corncribs, they don’t do one thing but sing their hearts out for us. That’s why it’s a sin to kill a mockingbird.”
By this definition, a mockingbird is someone or some thing that only does good things in the world. A mockingbird does not steal, harm, or wrongfully interfere in the lives of others. A mockingbird is a paragon of goodness.
In this novel, Boo Radley does not harm anyone and keeps to himself. He repairs Jem's pants when they are torn on the Radley's fence. He places things in the tree for the children to find. He puts a blanket on Scout's shoulders during Miss Maudie's house fire. And he does all of these things even though the children mock him and many of the townspeople consider him an outcast. In the end, he saves Jem and Scout from Bob Ewell. He goes out of his way to do these things.
Tom Robinson goes out of his way to help Mayella because he feels sorry for her. She basically raises the Ewell children herself. Her father is abusive and no help to her. Mayella tries to seduce Tom and he resists. Bob catches the two of them together and he convinces Mayella to accuse Tom of rape. Tom has done nothing but try to help a lonely girl.
In both cases, Tom and Boo are outcasts of different sorts. The town is racially segregated. When Tom is wrongfully accused, he is convicted by an all-white, prejudiced jury. He tried to help others and this leads to his death. At the end of Chapter 23, Jem surmises that Boo is a voluntary outcast. After discussing why people "go out of their way to despise each other," Jem concludes that Boo stays in his house to avoid the way people despise each other. Both Tom and Boo "go out of their way" to help others. In the time frame of this novel, they offer nothing but kindness. It is therefore a sin to harm or kill either one of them. Unfortunately, Tom is killed. It is the town's sin.
In the end, when there is talk of charging Boo with killing Bob Ewell, Heck Tate convinces Atticus to go along with the idea that Bob fell on his own knife. It would be a sin to put Boo through any unnecessary torment. Heck says:
To my way of thinkin’, Mr. Finch, taking the one man who’s done you and this town a great service an‘ draggin’ him with his shy ways into the limelight—to me, that’s a sin. (Chapter 30)