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 is His slave and Messenger.
Allaah, The Exalted, must be described only with what has been authentically attributed to Him by Himself or His Messenger; none is entitled to attribute anything to Allaah that has not been authentically attributed to Him in divine revelation, including the attributes of masculinity or femininity. We only describe Allaah with what He describes Himself or as His Prophet describes Him. It is impermissible to attribute masculinity or femininity to Allaah Almighty; the divine attributes are determined through divine revelation, i.e. religious texts.
The primary reason that the masculine pronoun 'He' is used in reference to Allaah is that it conforms with the rules of the Arabic language. In the Arabic language, the masculine pronoun is the default pronoun, and the pronoun is determined according to the closest noun already mentioned in the immediately preceding sentence.
The Imaam of the grammarians, Seebawayh said:
"It should be noted that the masculine form is easier for them to use than the feminine, because the masculine form is the original one and is more established (in the language), and the feminine form is derived from the masculine. Do you not see that the word shay' (thing) is applicable to everything that is mentioned (in the context), regardless of whether it is masculine or feminine, and the word shay' itself is a masculine noun."
Scholars asserted that not everything is described with either masculinity or femininity; the angels, for example, are neither masculine nor feminine in the true sense as stated by many scholars. The abstract nouns such as dominion, glory, poverty, and richness are not also described as masculine or feminine in the true sense. We refer to the angels with masculine pronouns because it is the default pronoun in the Arabic language and the feminine form is derived from it. Allaah, The Exalted, refers to Angel Jibreel (Gabriel) with the masculine pronoun 'He' in the verse that reads (what means): {...it is (none but) he who has brought the Quran down upon your heart (O Muhammad)...} [Quran 2:97]
Allaah knows best.