I agree with the previous posters. Heck Tate's role in the novel is connected mostly to two scenes, the shooting of the dog and the trial scene. In narrating the trial scene to us, Scout even conflates the two scenes. In the paragraph in chapter 21 beginning "But I must have been reasonably awake," Scout makes a number of clear connections between her father shooting the dog and (I suppose) her hope that her father will be equally successful in defeating the jury's racism.
I don't agree with the posters, though, that Tate is the embodiment of justice or compassion. He certainly does represent the law in the town of Maycomb, but he doesn't enforce the law equally and impartially. He purposefully hushes up a murder because he doesn't care one bit for the person murdered. That's not really justice, in my view, at least not the "blind" kind that's held up as our ideal.
Sheriff Heck Tate also serves as an example of sensible male authority in Maycomb, much in the way Judge Taylor does. An obvious admirer and friend of Atticus Finch (though he always calls him "Mister" Finch), Sheriff Tate is apparently not highly educated, but he does not fall into the same realm as the Old Sarum crowd, either. He is fooled by the lynch mob, who send him on a wild goose chase and plan to abduct Tom Robinson from the jail, but the Old Sarum bunch are keenly aware that their plans can not succeed if Sheriff Tate is present at the jail. Oddly, he calls Bob Ewell by his first name (but not Atticus--is it out of disrespect?), but he also realizes that the Ewells lied on the witness stand, sending an innocent man to prison. Tate has the common sense to allow Atticus to take the shot at the mad dog; enough pride in his town to realize that Ewell's death is "a great service" to Maycomb; and the compassion to save Boo the torture of an inquiry. Though a minor character in TKAM, Harper Lee has created one with depth and pride in his work, and not a caricature of the bumbling Southern law enforcement bumpkin so prevalent in other lesser stories and films.
Sheriff Heck Tate acts as a foil to Atticus Finch in three major scenes. That is, Tate is a character who demonstrates differing qualities from another by contrasting with that character. (literary devices. com)
The first instance in which the sheriff demonstrates that he is a foil is in Chapter 10, in which the rabid Tim Johnson staggers down the street. Jem and Scout expect the sheriff to shoot the dog. As the dog nears them, Atticus tells Tate,
"He's within range, Heck. You better get him before he goes down a side street...."
However, the sheriff hands the rifle to Atticus, saying, "Mr. Finch, this is a one-shot job." This act of Tate's demonstrates that, in contrast to Atticus, the sheriff is not as accurate a shot. And, since the children have never seen a gun in the hands of their father, they are shocked when he aims, fires, and kills the rabid dog with one shot.
The second instance in which the sheriff acts as a foil occurs in Chapter 15 when Mr. Tate and some of the businessmen come to the Finch house. The sheriff and the others are worried about the next day, when Tom Robinson will be moved to the Maycomb jailhouse because they fear that the old Sarum bunch might form a lynch mob. However, Atticus calmly asks Tate,
"You can keep him the night, can't you? I don't think anybody in Maycomb'll begrudge me a client, with times this hard."
Atticus, then, differs in opinion from Tate and convinces him and the other men to have the sheriff put Tom in the jailhouse.
The third instance in which Sheriff Tate is a foil to Atticus Finch is at the end of the narrative as Mr. Tate goes over the details of what has happened when Jem and Scout were attacked by the vindictive Bob Ewell. In contrast to Atticus, whose conscience will not allow things to be covered up, Tate convinces Atticus to keep quiet by holding to the testimony that Bob Ewell fell upon his knife.
Heck Tate, the sheriff in the small town of Maycomb, doesn’t seem to embody the stereotypical white southern law man often pictured in books and movies. He doesn’t take on the tough “good ol’ boy” role or seem to be particularly racist or prejudiced towards anyone in Maycomb. He helps Atticus when testifying about Tom Robinson in the rape trial, and realizes that charging Boo Radley for the murder of Bob Ewell is useless and poetic justice for what Ewell did lying about Mayella’s rape.
When the rabid dog wanders into town, Heck Tate is unsure about his shooting abilities and asks Atticus to take the shot. This behavior seems a little odd for a sheriff and shows Heck is probably not use to a lot of commotion or conflict in Maycomb. Scout describes Maycomb as a sleepy, dusty town where not much happens. That description also seems to fit Heck Tate’s job until the fateful summer of the trial of Tom Robinson. Heck Tate doesn't seem to be suited for the job of sheriff; however, he does seem like a decent man who represents a changing view of justice in the South.
Heck Tate, is the sheriff in the town of Maycomb where Atticus, Jem, and Scout live. He investigates the murder of Mr. Ewell and decides he will not prosecute. Instead he makes the decision to let it be an accident and leave it at that. He is important because he is the symbol of justice that had been denied to Tom Robinson. By taking a personal stand to make the decision of not having Boo charged he is also indicating that Boo would probably not have a fair trial much in the same way that Tom did not have a fair trial. He is justice.