Who - David speaking to the LORD, then to the people as a choir song.
What - This is a national lament. It is a lament over a national crisis that has come upon Israel by the opposing armies threatening Israel. It is a cry to the LORD for His help and deliverance.
When - The title gives the occasion of this psalm when Aram, Syria, Edom and Ammon assembled together to battle David and Israel in 2 Samuel 8:3-14 and 10:1-19. What we discover in those passages were multiple engagements with a very large fighting force arrayed against Israel. Not only was David and the army out numbered, but the Syrians had chariots while the Israelites did not. So it was both a technological and numerical disadvantage for David.
Where - Where this psalm was written is difficult to determine. Most likely it was written out in the field where David and his army were encamped in Ammon. If so, David was in a foreign land, outnumbered and overpowered by his enemies.
Why - David and the army were in a desperate situation. They were in a foreign land outnumbered and under-armed. All the advantages went to David's enemies. David calls upon the LORD to deliver and save Israel from these threats. If David and Israel lose this battle, the Davidic Dynasty never happens.
