Beric was the one who singled out the Night King to Jon, which at the very least established the potential for him to attempt to take out the White Walkers' leader.
Beric is a highly skilled warrior, but it no doubt requires more than ability with a sword to take down the Night King. Luckily, the Lightning Lord just so happens to have a bit of magic within him too. Although it was Thoros of Myr who brought him back, in other words is backed by the fire god in his battle against ice.
He's difficult to kill, a good fighter, has a flaming sword, and knows the Night King needs taking out.
With a sword (or even a borrowed hammer) in hand, Sandor Clegane is one of the most devastating warriors in Westeros. The reason he has a chance of defeating the Night King comes from the events of Season 7.
We saw the Hound, guided by Thoros, stare into the flames and actually have a vision of the mountain he'd later end up fighting at. In the finale, meanwhile, he gave a warning to his brother that could be taken as a prophecy.
He has been kissed by fire, which might mean the Lord of Light sees something in him. Add in his skills as a warrior, put a Valyrian steel sword in his hand, and he'd have at least half a chance against the Night King.
Ok, so Samwell Tarly is about as far removed from being a great warrior as Hot Pie is from being King, but that's exactly why he's a good bet to take out the Night King.
A reason for A Song of Ice and Fire's existence is because of George R.R. Martin's desire to subvert all the fantasy tropes that followed in the decades after Lord of the Rings. Sam, who is the character most like Martin himself in the story, is basically the hero's sidekick; Jon might be somewhere between Aragorn and Frodo, but Samwell Tarly is pure Samwise Gamgee.
What better way to truly subvert that, than by having him be the one who kills the ultimate evil? Sam's already killed a White Walker, so it's not completely ludicrous, and he could well know more about how to defeat the White Walkers than just about anyone else in the realm.