Lamech is the seventh son in the genealogy beginning with Adam, through Cain. The seventh generation is generally regarded as the "completed" generation, which characterizes the family line. (Seven being a number of completion in ancient Middle Eastern cultures). As such, Lamech demonstrates that the line of Adam, the father of sin, goes through Cain, the father of murder, and is completed with Lamech, the father of double murder, polygamy, boasting, intimidation and blasphemy. God's grace for Cain is used by Lamech to blaspheme God's grace by indicating that since Cain was a murderer and God protected him, then God will protect Lamech twice as much because he was a double murderer. It is blasphemy against God's grace.
Contrast Cain's genealogy through Lamech in Genesis 4 with Seth's genealogy in chapter 5. When Cain has a son, he builds a city and names it after his son. (chapter 4) When Seth (Cain's brother) has a child it says "Men began to call upon the name of the Lord." So there is a direct contrast at that generation. Cain's line is making a name for itself, Seth's line is interested in God's name. Cain and Seth are brothers, their children are first cousins. The contrast is clear.
Go down to Lamech, the double murderer and contrast him with the same generation of Seth's line, and you see Enoch, the man who walked with God and did not die. So again, in the exact same generation we have a murderer contrasted with a man who does not die, and a blasphemer contrasted with a man who walks with God.
Lamech's family line ends abruptly with his children and no explanation of what came after them. In other words, the family line ended in violence which Lamech boasted about. Enoch's family line continues down through Noah, who ultimately is the man who God uses to save the world.
The significance of Lamech, therefore, is to demonstrate the "completion" (seventh generation) of sin. Sin goes from bad (Adam) to worse (Cain) to un-redeemable (Lamech). In contrast, righteousness goes from God's grace on Adam to Seth who will be a righteous son in the form of Abel, who carries the family name after Abel is killed and Cain is exiled. Seth's family carries the righteousness that Cain rejected and keeps the family line alive after Abel is killed. Seth's family calls on the name of God, leads to Enoch who walks with God and doesn't die, to Noah, who saves the entire human race from dying.
One family line ends abruptly (presumably drowned in the flood). The other family line never ends and extends to the whole human race.