Does Allah Forgive Homosexual Acts?
Question

Could you inform me regarding the Islamic view about people who have committed homosexual acts but have repented and abstained from such acts? Should they be stoned to death? Can they be forgiven? And are they allowed to marry people of the opposite gender?
Praise be to Allah.Homosexuality in Islam
Undoubtedly the sin of homosexuality is one of the worst sins ; indeed, it is one of the major sins that Allah has forbidden. Allah destroyed the people of Lut (peace be upon him) with the most terrifying kinds of punishment because they persisted in their sin and made this evil action commonplace and acceptable among themselves. Allah says (interpretation of the meaning):
“So when Our Commandment came, We turned (the towns of Sodom in Palestine) upside down, and rained on them stones of baked clay, in a well-arranged manner one after another; Marked from your Lord.” [Hud 11:82-83]
Then Allah says, warning those who come after them of the nations who do the same deed as they did (interpretation of the meaning):
“and they are not ever far from the Zalimun (polytheists, evildoers).” [Hud 11:83]
And Allah says (interpretation of the meaning):
“And they indeed sought to shame his guest (by asking to commit sodomy with them). So We blinded their eyes (saying), `Then taste you My Torment and My Warnings.’” [Al-Qamar 54:37]
The Prophet (peace and blessings of Allah be upon him) said: “Whoever you find doing the action of the people of Lut, kill them, the one who does it and the one two whom it is done.” (Narrated by Ahmad, 2727; classed as authentic by Al-Albani in Sahih Al-Jami` As-Saghir wa Ziyadatihi, 6589)
Imam Ibn Al-Qayyim (may Allah have mercy on him) said:
“It was reported that the Prophet (peace and blessings of Allah be upon him) said: “Kill the one who does it and the one to whom it is done.” (Narrated by the four authors of Sunan. Its chain of narration is authentic. At-Tirmidhi said it is a sound Hadith)
Abu Bakr As-Siddiq (may Allah be pleased with him) judged in accordance with this, and he wrote instructions to this effect to Khalid (may Allah be pleased with him), after consulting with the Companions. `Ali (may Allah be pleased with him) was the strictest of them with regard to that. Ibn Al-Qasar and our Shaykh said: the Companions agreed that [the person who does homosexual acts] should be killed, but they differed as to how he should be killed. Abu Bakr As-Siddiq (may Allah be pleased with him) said that he should be thrown down from a cliff. `Ali (may Allah be pleased with him) said that a wall should be made to collapse on him. Ibn `Abbas (may Allah be pleased with him) said, they should be killed by stoning. 
This shows that there was consensus among them that [the person who does homosexual acts ] should be killed, but they differed as to how he should be executed. This is similar to the ruling of the Prophet (peace and blessings of Allah be upon him) concerning the person who has intercourse with a woman who is his Mahram [incest], because in both cases intercourse is not permitted under any circumstances. Hence the connection was made in the Hadith of Ibn `Abbas (may Allah be pleased with him) who reported that the Prophet (peace and blessings of Allah be upon him) said, “Whoever you find doing the deed of the people of Lut, kill them.” And it was also reported that he (peace and blessings of Allah be upon him) said: “Whoever has intercourse with a woman who is his Mahram, kill him.” And according to another Hadith with the same Isnad (chain of narration), “Whoever has intercourse with an animal, kill him and kill the animal with him.” (Narrated by Ahmad, 2420; Abu Dawud, 4464; At-Tirmidhi, 1454; Al-Hakim, 4/355)
This ruling is in accordance with the ruling of Shari`ah, because the worse the forbidden action is, the more severe the punishment for it. Having intercourse in a manner that is not permissible under any circumstances is worse than having intercourse in a manner which may be permitted in some circumstances, so its punishment is more severe. This was stated by Ahmad in one of the two reports narrated from him.” (Zad Al-Ma`ad, part 5, pp. 40-41)
Lesbianism in Islam
The same applies to the sin of lesbianism . There is no doubt among the jurists that lesbianism is prohibited and is a major sin, as stated by Ibn Hajar (may Allah have mercy on him). (Al-Mawsu`ah Al-Fiqhiyyah, part 24, p. 251)
Punishment for homosexuality in Islam
With regard to the specific type of punishment mentioned in the question – stoning to death – this kind of punishment is for the adulterer who is married. The Shar`i punishment for the crime of homosexuality is execution – by the sword, according to the most correct view – as was narrated in the discussion above about the differences among the scholars as to how this execution should be carried out. 
Punishment for lesbianism in Islam
As far as lesbianism is concerned, there is no prescribed punishment for it, but it is subject to Ta`zir [unspecified punishment to be determined at the discretion of the judge]. (Al-Mawsu`ah Al-Fiqhiyyah, part 24, p. 253)
Does Allah forgive homosexual acts?
But if the person who does this evil deed, or any other action which is subject to a prescribed punishment, repents, gives up that sin, seeks forgiveness, regrets what he has done and intends never to go back to it – Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) was asked about that, and he answered:
If a homosexual truly repents to Allah , Allah will accept his repentance, and he does not need to confess his sin to anyone so that the prescribed punishment would be carried out on him. (Majmu` Al-Fatawa, part 34, p. 180)
Allah says (interpretation of the meaning):
“And those who do not invoke1 with Allāh another deity or kill the soul which Allāh has forbidden [to be killed], except by right, and do not commit unlawful sexual intercourse. And whoever should do that will receive a penalty. The torment will be doubled to him on the Day of Resurrection, and he will abide therein in disgrace; Except those who repent and believe (in Islamic Monotheism), and do righteous deeds; for those, Allah will change their sins into good deeds, and Allah is Oft-Forgiving, Most Merciful. And whosoever repents and does righteous good deeds; then verily, he repents towards Allah with true repentance.” [Al-Furqaan 25:69-71]
Can homosexuals get married?
If a homosexual repents sincerely towards Allah, there is no reason why he should not get married , and indeed it may be obligatory in his case, as a protection for him and in accordance with what Allah has permitted. 
And Allah knows best.