أَلَكُمُ الذَّكَرُ وَلَهُ الأُنثىٰ
Are you to have males and He females?
EXPOSITION
The three idols of the preceding verses were mentioned because the Meccan polytheists thought of these to be angels and daughters of God: Did your Lord prefer you for sons, and [Himself] adopt females from among the angels (17:40). The Arab polytheists believed in Allah as the creator but believed Him to be uninterested in their affairs and having delegated the management of the world to His daughters: we only worship them so that they may bring us near to Allah (39:3).
This is linked to the earlier portion of the surah in which God describes the reality of the angel Gabriel as being something far above and beyond the feeble idols that the Meccans worshipped. Even Gabriel was nothing compared to the indescribable majesty of God. In the hierarchy of spiritual eminence, the wooden and stone idols of Quraysh were absurd in comparison to the reality of affairs.
The absurdity of these claims is brought to bear in the question of this verse, Are you to have males and He females? The Arab polytheists used to bury their own daughters alive because they saw them as inferior, yet they claimed that God begot daughters and bequeathed creation to them. The objective of this statement is not to agree with the polytheists views that daughters are inferior (or that God should have sons, or any kind of offspring or equal, or that He would delegate the management of His creation, etc.), but rather to point out the absurd and contradictory nature of their beliefs. Hence, it is asking: if daughters are good enough to be worshipped as deities, then why do they bury their own ones alive?!
[1] Nemuneh, 22/515-516.