Answer:
The judge was easy on Ponyboy because he had lengthy conversation with his doctor before the hearing. The doctor told him his whole situation and how hard his life was. How he lost his both parents in a car accident and how the deaths of Bob, Johnny and Dally which made his life even tougher. The doctor also told him that Ponyboy was quite ill. He told all these things to the judge so that the hearing doesn't make the situation even worse for him, and the judge understood.
He was acquitted because he was not under suspicion. All the evidence pointed to others and Ponyboy was found NOT GUILTY. The judge didn't want to make the situation worse for him and he just let him go.