أَوْ يُزَوِّجُهُمْ ذُكْرَانًا وَإِنَاثًا
Or He bestows both males and females,
means, He gives to whomsoever He wills both males and females, sons and daughters.
Al-Baghawi said,
"Like Muhammad."
وَيَجْعَلُ مَن يَشَاء عَقِيمًا
and He renders barren whom He wills.
means, so that he has no children at all.
Al-Baghawi said,
"Like Yahya and Isa, peace be upon them."
So people are divided into four categories;some are given daughters, some are given sons, some are given both sons and daughters, and some are not given either sons or daughters, but they are rendered barren, with no offspring.
إِنَّهُ عَلِيمٌ
Verily, He is the All-Knower,
means, He knows who deserves to be in which of these categories.
قَدِيرٌ
and is Able (to do all things).
means, to do whatever He wills and to differentiate between people in this manner.
This issue is similar to that referred to in the Ayah where Allah says of Isa, peace be upon him;
وَلِنَجْعَلَهُ ءَايَةً لِّلْنَّاسِ
And (We wish) to appoint him as a sign to mankind. (19;21)
i.e., proof for them of His power, for He created people in four different ways.
Adam, peace be upon him, was created from clay, from neither a male nor a female.
Hawwa', peace be upon her, was created from a male without a female.
All other people, besides Isa, peace be upon him, were created from male and female,
and this sign of Allah was completed with the creation of Isa bin Maryam, may peace be upon them both, who was created from a female without a male. Allah says;
وَلِنَجْعَلَهُ ءَايَةً لِّلْنَّاسِ
And (We wish) to appoint him as a sign to mankind. (19;21)
This issue has to do with parents, whilst the previous issue has to do with children, and in each case there are four categories. Glory be to the All-Knower Who is Able to do all things