All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
If rape refers to forcing the other party to commit the sin of Zina (fornication/adultery), then it is a grave sin for which Allaah Almighty threatened its perpetrator with punishment in this life and the Hereafter. As for that of this life, the perpetrator is to be lashed 100 times if he is not currently or previously married. If he is currently or previously married, he is to be stoned to death if the relevant Sharee'ah-set conditions are met. Also, the rapist should pay off a complete Mahr (dowry), and the raped woman should prove that she is not pregnant on account of the incident of rape by waiting three menstrual cycles. However, if what is meant by rape here is mere sexual enjoyment of a woman under duress, without having actual sexual intercourse, then this action, though extremely prohibited, does not entail the application of the prescribed corporal punishment which we have previously stated, but its doer should be discretionary punished according to the way determined by the judge. This is a general ruling in all crimes that have no corporal punishment set by the Sharee'ah.
In conclusion, crimes are never free from punishment. So, the corporal punishments that are explicitly stated in Islam should be applied, otherwise the matter is to be left to the Ijitihaad (independent reasoning) of the judge.
Allaah Knows best.