The Holy Quran Commands to punish the homosexual men, and to lock in the houses the lesbian women until death comes upon them, or until they repent. Let us look at Noble Verses 4:15-17:
"If any of your women are guilty of lewdness, Take the evidence of four (Reliable) witnesses from amongst you against them; and if they testify, confine them to houses until death do claim them, or God ordain for them some (other) way. (The Noble Quran, 4:15)"
"If two men among you are guilty of lewdness, punish them both. If they repent and amend, Leave them alone; for God is Oft-returning, Most Merciful. (The Noble Quran, 4:16)"
"Allah accept the repentance of those who do evil in ignorance and repent soon afterwards; to them will Allah turn in mercy: For Allah is full of knowledge and wisdom. (The Noble Quran, 4:17)"
What is the punishment for the gay men?
It was left open for the Islamic court to judge on based on each individual situation. However, if the CONVICTED FELON of any crime goes back to doing the same crime that he was convicted and punished for, then his punishment could reach the death penalty as I already showed in the Noble Verse above. Also, notice again in Noble Verse 4:17 above. Allah Almighty accepts the repentance of those who do evil due to ignorance. The Islamic court would most likely grant the benefit of the doubt to the felons who do their crimes the first time, as this is almost always the standard practice for all courts all around the world. But if you get convicted again, then the punishment would be much more severe.
I hope this helps, insha'Allah.
Take care,
Osama Abdallah