The punishment for rape in Islam is the same as the punishment for zina (adultery or fornication), which is stoning if the perpetrator is married, and one hundred lashes and banishment for one year if he is not married.
Moreover, Ibn `Abdul-Barr (may Allah bless his soul) said
The scholars are unanimously agreed that the rapist is to be subjected to the hadd punishment if there is clear evidence against him that he deserves the hadd punishment, or if he admits to that. Otherwise, he is to be punished (that is, if there is no proof that the hadd punishment for zina may be carried out against him because he does not confess and there are not four witnesses, then the judge may punish him and stipulate a punishment that will deter him and others like him). There is no punishment for the woman if it is true that he forced her and overpowered her. (Al-Istidhkaar, 7/146).
In addition, the rapist is subject to the hadd punishment for zina, even if the rape was not carried out at knifepoint or gunpoint. If the use of a weapon was threatened, then he is a muharib, and is to be subjected to the hadd punishment described in the verse in which Allah says (The recompense of those who wage war against Allah and His Messenger and do mischief in the land is only that they shall be killed or crucified or their hands and their feet be cut off from opposite sides, or be exiled from the land. That is their disgrace in this world, and a great torment is theirs in the Hereafter) (Al-Maidah 5:33).
So the judge has the choice of the four punishments mentioned in this verse and may choose whichever he thinks is most suitable to attain the objective, which is to spread peace and security in society, and ward off evildoers and aggressors.
Islamic Punishment for Rape - IslamonLine.net - Ask The Scholar