Allah stated the virtue of Adam above the angels, because He taught Adam, rather than them, the names of everything. This occurred after they prostrated to him. This discussion precedes that event here, only to show the importance of his position, and the absence of the angels' knowledge about creating the Khalifah when they asked about it. So Allah informed the angels that He knows what they do not know, and then He mentioned this to show them Adam's superiority over them in knowledge. Allah said,
وَعَلَّمَ ءَادَمَ الأَسْمَآءَ كُلَّهَا
(And He taught Adam all the names (of everything)).
Ad-Dahhak said that Ibn `Abbas commented on the Ayah;
(2) This episode, according to Imam al-Ash'ari (رح) ، shows that language as such has been created by Allah Himself, and not invented by man - its use by different kinds of men has later on produced the many forms of language.
(3) One should note a subtle suggestion here in the use of two words. In asking the angels for the names of things, Allah said, أَنبِئُونِي "Tell Me"; but in commanding Adam (علیہ السلام) to do so, He said, أَنبِئْهُم : "Tell them." The difference in the mode of expression shows that Adam (علیہ السلام) was given the rank of a teacher, and the angels that of pupils. It is thus an indication of his superiority over them. Another thing the episode indicates is that an increase or decrease is possible in the degree of knowledge the angels possess, for they were given, through Adam (علیہ السلام) ، at least a primary knowledge about a thing which they did not know before.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 31–32
The mixture of good and evil in mankind became evident when God, in His omnipotence, brought all the progeny of Adam before their first father. He said to the angels, ‘Look, these are the progeny of Adam. Can you give me the name of each one of them, and say what sort of people they will be?’ The angels, having no knowledge of them, were unable to answer. Then God told Adam their names and characteristics, and then commanded him to pass the knowledge on to the angels. When Adam had explained to them the nature of the human race, they realized that, besides the wicked and the corrupt, there would also be among their number great, righteous and pious souls.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.