God has always been clear that a country's government was to be firm in its criminal law. You see this throughout the Old Testament and in the New as well. When governments failed to carry out sound laws, God judged that nation. "For rulers hold no terror for those who do right, but for those who do wrong." (Romans 13:3) How can a criminal have terror when the country's legal system has 'no teeth'?
I remember about 10 to 20 years ago a judge in Florida gave rapists the option of serving time or being castrated and released to a rehabilitation program. I don't think many of the men opted for the castration, but I thought that the judge showed a great deal of insight and creativity in sentencing.
If justice does not come via the legal system and you yourself are innocent of wrongdoing, you can take your case before God who hears the cry of the innocent. You may have to be patient to see God's hand of justice, but I have seen His hand bring it time and time again. God is a God of love and mercy and He works to that option first, but He is also a God of Justice and a Shelter to those who are mistreated. To go past His line of mercy and find yourself in the place of His fierce anger is not a place you want to be.
A parallel question might involve "but what about forgiveness?' God has not called us to forgive the unrepentant offender, only the truly repentant one. When confronted with an unrepentant offender we are advised to go the extra mile, to turn also the other cheek to be striked, and to give in extra measure when wrongfully sued. The purpose? to shame the wrongful offender and to behave with honor before others. We are given advice that helps to prevent us from wallowing in self pity when injustice happens to us and instead to rise above it with dignity. How would this apply in a case of rape. Obviously you do not allow another rape. But, prayer and fasting for his soul, seeking his rehabilitation through prison ministry organizations, and concern for his family that will be hurt through his absence while incarcerated are equivalent. Forgiveness is not opening yourself up to more harm from unrepentant offenders, but expressing a mature dignity that amplifies their shame.