Tommy obviously took the money to pay their electric bill. His parents are touched, but disappointed, that he stole from the collection plate. So the first consequence is that he loses the trust of his parents.
As his punishment, he is required to return the money to the pastor and apologize for taking it. He expects to be chastised severely by the pastor for taking the money, but is surprised when asked why he took it in the first place. Tommy is so astounded that he tells the truth - he took it to pay their electric bill. The pastor hands the money back to Tommy and tells him that it is for his family to pay their electric bill with. The church is there not only to strengthen their relationship with God, but to help them through the rough times. Stealing from the collection plate is not the proper way to go about it - that is wrong. Much simpler just to ask for help.
So the good that comes out of this is that their electric bill is paid and Tommy learns a valuable lesson about caring for others.