To Kill a Mockingbird by Harper Lee is full of instances of both justice and injustice, and most of them happen outside of the courtroom. In fact, the most obvious miscarriage of justice happens in a courtroom but is redressed outside of it. Justice is defined as:
The upholding of what is just, especially fair treatment and due reward in accordance with honor, standards, or law.
Note that it does refer to the law, but it also refers to fair treatment, honor, and standards, which are important elements in this story.
According to this definition, both Cecil Jacobs and the Finches' cousin Francis are served a little justice by Scout in the form of a physical blow. Both boys accuse Atticus of being a "nigger lover" who defends guilty black men, and both of them get punched for saying it. This is a form of "fair treatment and due reward" for their insults. Neither boy is punished (in fact, Scout is the one who gets punished), but Scout upholds what she sees as justice ("fair treatment") in the most obvious (and admittedly reactionary) way she knows how.
Another kind of justice is administered when Sheriff Tate and Atticus (and Scout, though she may not realize it) decide not to reveal the truth about Boo Radley's killing Bob Ewell. Though their decision does circumvent the law, they consider it to be an act of justice to keep Boo Radley from having to appear in a courtroom. They know that he will be acquitted and his act labeled as a justifiable homicide; they also know that he will be celebrated by everyone in town, something he could not bear to endure. This keeping him out of the courtroom is "fair treatment" and Boo's "due reward" for saving the children's lives.
Link Deas performs an act of justice when, after Tom dies, he hires Helen Robinson to work for him, though he does not need her to. He tells Ewell:
all you have to do is make her afraid,
and he will take him to court. Of course, this also allows Deas to get back a bit at Bob Ewell, but mostly it is his way of offering Tom's widow "fair treatment" and "due reward" for the injustice perpetrated on her husband and family.
The most obvious example of justice being administered outside of a courtroom is what happens to Bob Ewell. Ewell intentionally lied in court to spitefully and wrongfully convict an innocent man of a crime. Later, he makes threats against the judge and Atticus Finch and his family; eventually he carries out that threat and tried to kill Scout, one of Atticus's children. He does not finish his foul deed because he is killed by a neighbor who sees the struggle and intervenes.
Boo Radley had no motive or desire other than wanting to protect the Finch children; however, his is an act of ultimate justice in two ways. First, he kills a man who was intent on killing innocent children; second, he achieves justice for Tom Robinson, though it is too late to actually do Tom any good. Bob Ewell got his "fair treatment and due reward."
Of course there are many small moments of justice when people like Miss Maudie stand against cruel gossip about Boo Radley or when B.B. Underwood is defends a black man (something he claims to despise) against the vigilantes who come to usurp the rule of law at the jail house. Even Judge Taylor demonstrates justice ("fair treatment") the best he can by appointing Atticus Finch as Tom's lawyer (an act which technically happens outside of the courtroom).
This is a novel about many things, and justice (and its opposite, injustice) is one of them.
The most telling example of "how justice is served outside of the confines of the courtroom" is how Boo Radley jumps to Scout and Jem's rescue when they are walking home from school when they are accosted by Bob Ewell who is lying in wait for them. That Bob is seeking to harm the children is indicative of his understanding of "justice" - their father represented a "black" man and humiliated him in court, so he must seek revenge. And that Boo Radley, who until then is just a name and literally a character in the shadows, (whom Scout instinctively takes to in the final scene of the book, arguably one of the most touching in literature), jumps out to nowhere to come to their aid.
As a wonderful extension of this "justice" is how the "mockingbird" rule is evoked when the sheriff and Atticus discuss how best to keep Boo out of court. This beautifully sums up the book as well as brings about a sense of justice having been delivered after all, not only for Tom Robinson in a twisted, roundabout way, but also that Boo Radley comes out of the "shadows" and is embraced by Scout, who can be seen as an embodiment of all of Atticus's great values: nobility, integrity, openness, kindness, empathy, with an unshakeable moral compass and an arm always willing to reach out to help.