As Moses comes to the end of his life he urges the Jewish nation to make sure its court system is established with “highly qualified judges who also have impeccable character” (Deut. 16:18).
One of the ideas behind this is that knowledge is not enough. Our interactions with judges or other spiritual leaders do not serve simply to tell us what to do, but to inspire us and to show us through their living example what great levels we should aspire to.
The role of a judge is also to inspire us to become a better person, to be more forgiving usually comes from role models whose character and essence will inspire us to become the best we can be. The law can only tell us what to do, but to truly change ourselves and grow, we need people who can serve as our role models.
Moses is telling us that if we keep growing spiritually, both as a nation and as individuals, we will blossom to become a light not only to those around us but to the nations of the world.