[This translation is mostly King James with a little of Alter and a little of DovBear tossed in.]
By the steams of Babylon, there we sat down and wept, when we remembered Zion.
This verse alone should silence anyone who says that King David wrote or published the whole book of Psalms. (If you're the type who won't accept the obvious unless it has the blessing of a Rabbi, please refer to the Ibn Ezra, who says this Psalm was written during the exile.)
We hung our harps upon the poplars there
For there our captors requested words of song; and our conquerors demanded rejoicing , saying, Sing us one of the songs of Zion.
How shall we sing the LORD's song in a strange land?
Meir Gruber points out that from the perspective of the Babylonians the songs are secular, possibly nationalistic ("songs of Zion"); from the perspective of the captives the music is sacred. ("the Lord's song".)
If I forget thee, O Jerusalem, let my right hand forget
The Hebrew does not tell us what the right hand should forget. Some say this is a scribal error and substitute tikhash, "wither" (a difference only in the order of consonants.) Others say the Hebrew word tishkach (forget) is meant to pun on tikhash (whither), while refering back to the earlier eshkochaych (future, or perfect present, tense of forget) ; still others say "let my right hand forget" was a familiar idiom with a widely understood meaning, like "losing my mind."
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 right hand would have been used to pluck the cords of the previously discarded harp; the tongue would have been used to sing. When the psalmist suggest he is willing to forfeit the use of his hand and tongue, he is dramatically resigning from the occupation of music-making. An athlete might say, "I'm hanging up my sneakers."
Remember, O LORD, the children of Edom in the day of Jerusalem; who said, Rase it, rase it, even to the foundation thereof. Daughter of Babylon, who art to be destroyed; happy shall he be, that rewardeth thee as thou hast served us.
The Hebrew, here, is a problem, because it puts the destruction of Babylon in the future. Either the psalmist is longing for the destruction of his enemy, or this is another scribal error: Reversing the order of the consonants yields "The despoiler." (I find the first solution perfectly plausible, but many do not.)
Happy is he who seizes and dashes your infants against the rocks.
This is possibly the most immoral line in the Hebrew Bible, but the sentiment is perfectly understandable: The psalmist is expressing legitimate, honestly-felt outrage. It should not be understood as a biblical endorsement of genocide.