What does Matthew 5:25 mean?
In giving examples to illustrate the importance of setting aside anger and reconciling relationships, Jesus has once again escalated standards far beyond what makes us comfortable. In the previous verses, He described a worshiper setting down their gift before making the offering to God in order to go make things right with a brother (Matthew 5:23–24).Now He describes someone who is being taken to court for some reason. The assumption here seems to be that the accused wasn't aware of their offense until it was brought to court, or they were not able to reconcile before then. The advice here is not only practical, it's also meant to continue the spiritual lesson Jesus began in earlier verses. If the courtroom accuser wins the case before the judge, the accused will be handed over to the guard and taken to prison. No longer is the motive simply to have a right spirit and a good relationship with people. Now the motive is to avoid judgment and prison.
Jesus is comparing the spiritual stakes of unresolved conflict to the civil stakes of an unresolved lawsuit. In either case, if you've truly wronged another person, you are in danger of judgment. The proper response is to make things right quickly— both to have a pure heart and to avoid judgment for wrongdoing.