As the Grammarly blog explains: “The phrase hear, hear seems to have come into existence as an abbreviation of the phrase hear him, hear him, which was well-established in Parliament in the late seventeenth century. The UK Parliament prides itself on its lively debates, and saying “hear him, hear him” was a way to draw attention to what a person was saying. … Sometime during the eighteenth century hear him, hear him acquired its short form, hear, hear, and that form is still used today.”
A contributor to StackExchange noted that the phrase must be older than this entry in Pearson’s Political Dictionary from 1792:
What was originally a parliamentary call for attention has turned into a phrase the OED describes as being “used to express one’s wholehearted agreement with something said, especially in a speech.” As Yahoo! News recently reported about Samantha Bee: “She was also recently her hilarious self on The Late Show with Stephen Colbert, talking about how she cannot wait for the election to end (hear, hear!)”
***