The Glorified God commands in the 15th verse of chapter Nisa:
“Call four witnesses among you against those of your woman who commit vice (unlawful sexual intercourse). If they testify, confine them (women) to houses. That is so until death take them, or until God appoints for them a way .“ (An-Nisa/The Women 4:15)
As it is understood by the underlined part of the verse, a new legal ruling was expected be set about the women that commit adultery. Thus, after a while, the 2nd verse of chapter Noor has been revealed and the ruling about them has been appointed. The Glorified God commands:
“The female fornicator and the male fornicator, flog each of them hundred stripes. If you trust in God and in the Last Day, do not let compassion towards either of them to possess you when you perform the command of God. Let a party of the believers testify with their own eyes to the torment they are put to.” (An-Noor / The Light 24:2)
For that reason, it is impossible to think that the 15th verse of chapter Nisa intends lesbians; but there are rulings, explained by the other verses, in relation to the fornicators (men and women).
Until the following command arrived, the punishment for fornication was being stoned to death (rajm), because it was the command prescribed in the Torah and Muslims used to complying with the Torah before a superseding ruling on a certain matter was sent down in the Quran. Since illegal sexual intercourse involves both men and women, the punishment for men has been appointed later on, in the following verse of chapter Nisa:
“Discomfort both of them (man and woman) among you that commit vice (illegal sexual intercourse). If they turnaround and reform themselves, then leave them alone. God welcomes the turnarounds. He is the Most Beneficent.” (Nisa 4:16)
The personal pronouns in the verse are masculine because of the Arabic grammatical structure. In Arabic grammar there is a rule known as Taglib. According Taglib rules, the pronoun or the verb that is used to refer to men and women together have to be in masculine form.