The book of Lamentations was written by the prophet Jeremiah as a sort of appendix to his book of prophetic writings. As David and others wrote many sacred songs of joy, these are sacred songs of lament, or sadness.
Jeremiah is expressing his sadness at seeing his prophecies fulfilled. Though he was ill-treated by his countrymen when he delivered God’s message to them, he is nonetheless heartbroken at the destruction that he sees come upon them.
He wrote these songs, or odes, when he saw the destruction of Judah and Jerusalem by the Chaldean army and the falling apart of the Jewish state…both the government and the body of Jewish believers. This might be referred to as a dirge for Jerusalem.