How the Hoopoe came before Sulayman and told Him about Saba'
Allah says:
فَمَكَثَ غَيْرَ بَعِيدٍ
(But (the hoopoe) stayed not long,) meaning, he was absent for only a short time. Then he came and said to Sulayman:
أَحَطتُ بِمَا لَمْ تُحِطْ بِهِ
(I have grasped which you have not grasped) meaning, `I have come to know something that you and your troops do not know.'
وَجِئْتُكَ مِن سَبَإٍ بِنَبَإٍ يَقِينٍ
(and I have come to you from Saba' with true news.) meaning, with true and certain news. Saba' (Sheba) refers to Himyar, they were a dynasty in Yemen. Then the hoopoe said:
إِنِّى وَجَدتُّ امْرَأَةً تَمْلِكُهُمْ
(I found a woman ruling over them,) Al-Hasan Al-Basri said, "This is Bilqis bint Sharahil, the queen of Saba'." Allah's saying:
I have found her and her people prostrating to the sun - 27:24
This shows that her people were star-worshippers and used to worship the sun. Some believe that they were Zoroastrians, who worship fire and all forms of light.
أَلَّا يَسْجُدُوا لِلَّـهِ الَّذِي يُخْرِجُ الْخَبْءَ (that is, they do not prostrate to Allah who bring forth what is hidden - 25).This sentence is linked with the previous one, "The Shaitan has beautified their deeds - 26" and the sense is that the Shaitan had engrained in their minds that they should not bow down before Allah, or had prevented them from the righteous path so that they should not prostrate before Allah Ta’ ala.
Tazkirul Quran
Maulana Wahiduddin KhanOn ayahs 26–34
The Sabeans were a wealthy community of ancient times (1100 B.C. to 115B.C.). Their country was located in Ma‘arib (Yemen), where its grand ruins are still in existence. During Solomon’s period, this area was under the rule of a queen called Sheba (Bilqis). The people of this place used to worship the sun, Satan having taught them that the only thing worth worshipping was whatever was most prominent. As the sun was the most prominent of all visible things, only the sun, therefore, deserved to be considered a god and worshipped. Solomon received detailed information about the Sabeans through the hoopoe bird. This hoopoe perhaps belonged to Solomon’s army of birds and possibly received regular training.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.