When David died, Solomon inherited his position as the Prophetic King of the Israelites.
He prayed to God to grant him a Kingdom which would be unlike any after him.
God accepted Solomon's prayer and gave him what he pleased.
It was at this stage that Solomon began to acquire the many gifts that God would bestow upon him throughout his life.
The Qur'an narrates that the wind was made subservient to Solomon, and he could control it at his own will, and that the jinn also came under Solomon's control.
The jinn helped strengthen Solomon's reign, and the unbelievers among them along with the Shaitan  were forced building for him monuments.
God also caused a miraculous ʿayn (Arabic: عَيْن‎, 'fount' or 'spring') of molten qiṭr (Arabic: قِطْر‎, 'brass' or 'copper') to flow for Solomon, to be used by the jinn in their construction.

Solomon was even taught the languages of various animals, such as ants.
The Quran recounts that, one day, Solomon and his army entered a wadin-naml (Arabic: وَادِ ٱلْنَّمْل‎, valley of the ant).
On seeing Solomon and his army, a namlah (Arabic: نَمْلَة‎, female ant) warned all the others to "... get into your habitations, lest Solomon and his hosts crush you (under foot) without knowing it."
Immediately understanding what the ant said, Solomon, as always, prayed to God, thanking Him for bestowing upon him such gifts and further avoided trampling over the ant colonies.
Solomon's wisdom, however, was yet another of the gifts he received from God, and Muslims maintain that Solomon never forgot his daily prayer, which was more important to him than any of his gifts.
When David died, Solomon inherited his position as the Prophetic King of the Israelites. He prayed to God to grant him a Kingdom which would be unlike any after him. God accepted Solomon's prayer and gave him what he pleased. It was at this stage that Solomon began to acquire the many gifts that God would bestow upon him throughout his life. The Qur'an narrates that the wind was made subservient to Solomon, and he could control it at his own will, and that the jinn also came under Solomon's control. The jinn helped strengthen Solomon's reign, and the unbelievers among them along with the Shaitan  were forced building for him monuments. God also caused a miraculous ʿayn (Arabic: عَيْن‎, 'fount' or 'spring') of molten qiṭr (Arabic: قِطْر‎, 'brass' or 'copper') to flow for Solomon, to be used by the jinn in their construction.
Solomon was even taught the languages of various animals, such as ants. The Quran recounts that, one day, Solomon and his army entered a wadin-naml (Arabic: وَادِ ٱلْنَّمْل‎, valley of the ant). On seeing Solomon and his army, a namlah (Arabic: نَمْلَة‎, female ant) warned all the others to "... get into your habitations, lest Solomon and his hosts crush you (under foot) without knowing it." Immediately understanding what the ant said, Solomon, as always, prayed to God, thanking Him for bestowing upon him such gifts and further avoided trampling over the ant colonies. Solomon's wisdom, however, was yet another of the gifts he received from God, and Muslims maintain that Solomon never forgot his daily prayer, which was more important to him than any of his gifts.
Solomon in Islam