فَأَعْرَضُوا
But they turned away,
means, from worshipping Allah alone and from giving thanks to Him for the blessings that He had bestowed upon them, and they started to worship the sun instead of Allah, as the hoopoe told Suleiman, peace be upon him;
فَمَكَثَ غَيْرَ بَعِيدٍ فَقَالَ أَحَطتُ بِمَا لَمْ تُحِطْ بِهِ وَجِيْتُكَ مِن سَبَإٍ بِنَبَإٍ يَقِينٍ
إِنِّى وَجَدتُّ امْرَأَةً تَمْلِكُهُمْ وَأُوتِيَتْ مِن كُلِّ شَىْءٍ وَلَهَا عَرْشٌ عَظِيمٌ
وَجَدتُّهَا وَقَوْمَهَا يَسْجُدُونَ لِلشَّمْسِ مِن دُونِ اللَّهِ وَزَيَّنَ لَهُمُ الشَّيْطَـنُ أَعْمَـلَهُمْ فَصَدَّهُمْ عَنِ السَّبِيلِ فَهُمْ لَا يَهْتَدُونَ
"I have come to you from Saba' (Sheba) with true news. I found a woman ruling over them, she has been given all things, and she has a great throne. I found her and her people worshipping the sun instead of Allah, and Shaytan has made their deeds fair seeming to them, and has barred them from the way, so they have no guidance." (27;22-24)
فَأَرْسَلْنَا عَلَيْهِمْ سَيْلَ الْعَرِمِ
so We sent against them flood released from the dam,
Some, including Ibn Abbas, Wahb bin Munabbih, Qatadah and Ad-Dahhak said that;
when Allah wanted to punish them by sending the flood upon them, he sent beasts from the earth to the dam, large rats, which made a hole in it.
Wahb bin Munabbih said,
"They found it written in their Scriptures that the dam would be destroyed because of these large rats. So they brought cats for a while, but when the decree came to pass, the rats overran the cats and went into the dam, making a hole in it, and it collapsed."
Qatadah and others said,
"The large rat is the desert rat. They gnawed at the bottom of the dam until it became weak, then the time of the floods came and the waters hit the structure and it collapsed. The waters rushed through the bottom of the valley and destroyed everything in their path -- buildings, trees, etc."
As the water drained from the trees that were on the mountains, to the right and the left, those trees dried up and were destroyed. Those beautiful, fruit-bearing trees were replaced with something altogether different, as Allah says;
وَبَدَّلْنَاهُم بِجَنَّتَيْهِمْ جَنَّتَيْنِ ذَوَاتَى أُكُلٍ خَمْطٍ
and We converted their two gardens into gardens producing bitter bad fruit (ukul khamt),
Ibn Abbas, Mujahid, Ikrimah, Ata' Al-Khurasani, Qatadah and As-Suddi said,
"It refers to Arak (Zingiber officinale) and bitter bad fruit."
وَأَثْلٍ
and Athl,
Al- Awfi and Ibn Abbas said that this means tamarisk.
Others said that it means a tree that resembles a tamarisk, and it was said that it was the gum acacia or mimosa. And Allah knows best.
وَشَيْءٍ مِّن سِدْرٍ قَلِيلٍ
and some few lote trees.
Because the lote trees were the best of the trees with which the garden was replaced, there were only a few of them.
This is what happened to those two gardens after they had been so fruitful and productive, offering beautiful scenes, deep shade and flowing rivers;they were replaced with thorny trees, tamarisks and lote trees with huge thorns and little fruit. This was because of their disbelief and their sin of associating others with Allah, and because they denied the truth and turned towards falsehood.
Allah said;
ذَلِكَ جَزَيْنَاهُم بِمَا كَفَرُوا وَهَلْ نُجَازِي إِلاَّ الْكَفُورَ