I found her and her people prostrating to the sun instead of Allāh, and Satan has made their deeds pleasing to them and averted them from [His] way, so they are not guided,
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 19–25
In Solomon’s army there were not only human beings but also genies and birds. Once Solomon’s army passed through a valley where there was a large number of ants. On this occasion Solomon understood what the ants were saying to each other. Such an incident would be enough to give rise to conceit and pride in an ordinary man. But, Solomon became the embodiment of gratitude on this account. He fully attributed to God whatever appeared to be his—and this is the way of a pious and righteous man.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.