In Lamentations 2:8 what does it mean to "stretch out a line"?
Rashi says that it refers to a "line of judgment":
What might a "line of judgment" be?
A קָו is a measuring tool used by builders when planning to build or destroy a building (the meaning of the word as "line" is correct in later Hebrew, but not in the Bible). What Rashi is saying is that the measuring stick is used in this verse as a metaphor for judgment that leads to punishment. The same metaphor is used in 2 Kings 21:13. A more familiar metaphor with the same connotation is the symbolism of scales as judgment (e.g. Daniel 5:27).
The imagery of the verse is a builder (God) who uses a measuring stick (judgment) and decides to destroy the walls of the city (the destruction of Jerusalem).