(586 destruction of Jerusalem - 539 bc)
1 By the rivers of Babylon, there we sat down, yea, we wept, when we remembered Zion.
2 We hanged our harps upon the willows in the midst thereof.
3 For there they that carried us away captive required of us a song; and they that wasted us required of us mirth, saying, Sing us one of the songs of Zion.
Conquerors taunt Israel - Your Elohim failed to protect you.
4 How shall we sing Yahweh's song in a strange land?
5 If I forget thee, O Jerusalem, let my right hand forget her cunning.
The Psalmist longs to play tehillim in the holy land
6 If I do not remember thee, let my tongue cleave to the roof of my mouth; if I prefer not Jerusalem above my chief joy.
The Psalmist longs to sing tehillim in Jerusalem
7 Remember, O Yahweh, the children of Edom in the day of Jerusalem; who said, Rase it, rase it, even to the foundation thereof.
8 O daughter of Babylon, who art to be destroyed; happy shall he be, that rewardeth thee as thou hast served us.
Babylon was a lover of idols, the central great promenade and the great high walls were dedicated to Bel and Ashteroth, as was the Ishtar gateway, with idols on the enamalled marble tiles, and of course the temple of Babylon on top of a Ziggurat (stepped pyramid).
Cyrus and the Persians abominated idols, being Zoroastrians, and smashed the lot of them when they took Babylon in a night, though it boasted it could stand a twenty year seige.
The Apocalyptic Messenger, Nov 2017
9 Happy shall he be, that taketh and dasheth thy little ones against the stones.
From v8 "happy shall he be, that rewardeth thee as thou hast served us" it appears the Babylonian victors slaughtered the Hebrew infants during the taking of Jerusalem. The Psalmist cries out for vengeance in like for like manner