David, of course, was the second King of Israel (later just Judah) who had descendants also upon the throne. We see that Jesus was indeed descended in direct lineage from David through many generations. In some cases in the Bible, "son of" is used to refer to descendants rather than literal sons. Thus, Jesus could be called a "son of David".
But because of the prophecy to David in 2 Samuel 7:16,
And your house and your kingdom shall be made sure forever before me. Your throne shall be established forever.
the Jewish people were looking for a King that would rule without end, many of course thinking that he would set up an earthly kingdom. Clearly this refers to David's descendants.
John 7:42 says that:
Does not Scripture say that the Messiah will come from David's descendants and from Bethlehem, the town where David lived?
Referring to 2 Samuel 7 (the line from which he will come) and Micah 5:2 (specifically naming Bethlehem as his birthplace).
Jesus, of course was the fulfillment of the prophecy of Psalm 110:1
A Psalm of David 1 The Lord says to my Lord: “Sit at my right hand, until I make your enemies your footstool.” (emphasis mine)
As we see in Mark 12:35-37, Jesus clearly states that this refers to him.
But perhaps most significantly and clearly is the prophecy in Isaiah 9:6-7:
“For unto us a child is born, unto us a son is given: and the government shall be upon his shoulder: and his name shall be called Wonderful, Counsellor, The mighty God, The everlasting Father, The Prince of Peace. Of the increase of his government and peace there shall be no end, upon the throne of David, and upon his kingdom, to order it, and to establish it with judgment and with justice from henceforth even for ever. The zeal of the LORD of hosts will perform this.”
There is little doubt that the Jewish authorities of the day missed this prophecy, clearly stating that a son is given...name is mighty God...upon the throne of David. In short, his title of "son of David" was the declaration that he was the promised Messiah, and God himself.
Source 1, Source 2, Source 3