When the book ends with Atticus putting Scout to bed, the story ends on a soothing note, demonstrating that even after the trials the Finch family have been through, they will be all right.
After the frightening and revealing events of Bob Ewell’s attack and Boo Radley’s coming to her rescue, Scout is relaxed. The danger is passed, both to Scout and Jem and to Boo.
He turned out the light and went into Jem’s room. He would be there all night, and he would be there when Jem waked up in the morning. (chapter 31)
It is happy ending for the Finch family, despite the traumatic events of the trial. It also demonstrates that even though Scout is getting older, she is still a child.
Throughout To Kill a Mockingbird, both Jem and Scout witness some very significant injustices, from the false accusation of rape and subsequent imprisonment and death of Tom Robinson to the malicious social discrimination of various "classes" of people (the Cunninghams, the Ewells, etc.) in Maycomb. They come face-to-face with some truly hideous acts of racism, sexism, ignorance, and violence; in the process, they are forced to grow up and develop moral consciences.
At the end of the novel, Scout and Jem barely survive the vicious attack of Bob Ewell, who tries to kill the children as revenge for Atticus defending Tom Robinson in court and "humiliating" the Ewell family by demonstrating that they are liars.
Thus, when Atticus puts Scout to bed at the conclusion of the book, we understand that despite the tumultuous events of the past two or so years, she is in safe hands. Scout still has a great amount of growing to do, and the presence of a parent can serve as a source of comfort at her young age. She will continue to evolve and thrive under the watchful eye of her good and patient father and will hopefully aid the rest of Maycomb in evolving into a more tolerant, peaceful place as well.