When did David compose this Mizmor?
Malbim: He prays to be saved from Ba'alei Leshon ha'Ra.
Why does it say "Shir ha'Ma'alos"?
Rashi: The Leviyim said this on the 15 steps that descend from Ezras Yisrael to Ezras Nashim; there are 15 Mizmorim of "Shir ha'Ma'alos." Radak (from Sukah 51a) (one for each step).
Rashi citing Sukah 53a-b: He said them to raise the Tehom 1 .
Rashi citing Yerushalmi Sanhedrin 10:2: It is Shir for 100 steps 2 .
Radak citing Rav Sadya Gaon: These Mizmorim were said very loud, each louder than the previous.
Radak: They express the hope of Bnei Galus to be Oleh (ascend) from Galus to Eretz Yisrael.
Radak citing Sukah 53b: When David was digging the foundations for the Mikdash, water from below threatened to flood the world. Achitofel wrote Hashem's name on earthenware and dropped it on the source; the water descended 16,000 Amos. David said 15 Shir ha'Ma'alos to raise it 15,000 Amos, lest it be too far from the ground.
Why does it say "El Hashem"?
Malbim: In every affliction I called to Hashem, and He answered me. However, there is a greater Tzarah for which I cannot delay praying until it comes - the trap of schemers and slanderers. They cover their hatred with deceit.
What Tzarah is discussed?
Radak: It is the affliction of Bnei Galus. It is in the singular, corresponding to the Klal. The Tav is due to the great affliction. This is like Yeshu'asah - great salvation.
Why does it say "va'Ya'aneni"?
Radak: Past tense used in place of future; this is common in Nevu'ah (Radak (Yirmeyah 46:23) - for Nevu'ah for the future exists, as if it [already] came.)