Poor Johnny has a really rough life. According to Pony, sixteen-year-old Johnny looks like "a little dark puppy that has been kicked too many times and is lost in a crowd of strangers" (1.49). Oof.
When his parents aren't physically and or verbally abusing him, they're ignoring him. Johnny can stay away from home for long periods of time and nobody seems to care or notice, in sharp contrast to Pony's situation.
To make things even worse, Johnny was brutally beaten by the Socs last spring and now lives in a constant state of fear and PTSD:
I had never been jumped, but I had seen Johnny after the four Socs got hold of him, and it wasn't pretty. Johnny was scared of his own shadow after that. He was sixteen then. (1.7)
On top of that, he doesn't quite get enough to eat, he often sleeps outdoors, and is even contemplating suicide. The gang makes up Johnny's entire support system, but since they're struggling kids themselves, this support is far from sufficient.
Even though Johnny has had crummy role models, he's tries to stand up and be a good person. We never see him being mean or mistreating others. He even challenges his idol, Dallas, when he sees how uncomfortable Dallas is making Cherry and Marcia at the movies. Of course, this connection with the girls has some disastrous consequences since their boyfriends are Randy and Bob—the very Socials that beat Johnny so badly earlier in the year.
And that gets us into one of the trickiest territories of the novel—Johnny's killing of Bob. Since the story is told from Pony's point of view, we never get the full details of the killing. All we know is that when Johnny stabbed Bob, David stopped trying to drown Pony in the fountain. Johnny saved Pony's life. But how do you feel about this? Did Johnny do the right thing? Did he have other options? Did he act in self-defense?
Just before he dies, Johnny tells Pony to "Stay gold" (10.119). At the time, Pony has no idea what he's talking about. Astute readers will remember the Robert Frost poem, "Nothing Gold Can Stay," that Pony recited when he and Johnny watched the sun rise on top of Jay Mountain.
In the poem, the speaker suggests that the sunrise (gold) is the most innocent, pure part of the day. As the day goes on, it loses that innocence, just as human beings lose a lot of their innocence and purity when they grow up. Johnny explains that Pony's love of nature is part of his innocence, and that by holding on to this love, Pony can "stay gold."
Sadly, Johnny seems to feel that his own innocence has been so completely lost that other (more innocent) people have more of a right to life than he does. He writes,
Listen, I don't mind dying now. It's worth it. It's worth saving their kids. Their lives are worth more than mine, they have more to live for. Some of their parents came by to thank me and I know it was worth it. (12.64)
Is Johnny right? Can we say if one human life is worth more than another? Are the lives of five children worth more than the life of one teenage Johnny?
All the same, this message shows that Johnny wants to protect others (like Pony and the kids) not only from physical harm (like the fire) but from loosing their innocence (like Johnny has from his rough, violent life).
Johnny saved the kids because it was the right thing to do. It would've been very hard for him to live with himself if he hadn't tried to help and the kids had then died. Yet, Johnny's words show us a case of deep self esteem problems; he doesn't think that his life is worth as much as the kids'.
Even as a hero, Johnny doesn't really feel worthy of life. He's been kicked around, ignored, and abused all his life. Outside of his gang of friends, he's been told over and over that he has no value. Physical and emotional strain, plus guilt over killing Bob, make it even worse.
When Johnny writes "Some of their parents came by to thank me and I know it was worth it," he shows thinks that a person like him—whose own parents don't love him—can't be worth much. Johnny doesn't realize that his parents' abuse really had little to do with who he is, and more to do with who his parents are. He just can't see the good in himself, other than in those moments when he was saving the children.
But there's another way to look at it, too. Johnny seems also to be saying that he's come to terms with his death, because death was the price he had to pay to regain some of the innocence he'd lost. Rescuing the children was a selfless action that Johnny performed willingly and performed well.
After being involved in so much violence, it probably made him feel clean and new, at least to some degree. He would prefer to live, even though he's probably more scared to live than to die, because he can see that there is good in the world, and that he's been a part of it.