To preface, I am not a Hog main but I am a tank flex and have played him enough to get him in my top five or so. So there are probably people here that have more time on him than me and know him better than I do.
The main thing is knowing when to pick him and knowing what to do as him.
For when to pick him, he works in deathball and bunker. If your main tank is a Reinhardt, then people will prefer Zarya, but Hog still works with him. And if the main tank is Orisa, then Orisa/Hog is a great tank combo. And since the meta is shifting to bunker, that tank combo will be your bread and butter. The tank combos there will either be Orisa/Hog for pure bunker or Orisa/D.Va if you want an off-tank that can contest point so the bunker doesn’t need to leave high ground so early.
So Hog is a staple pick for bunker comps, and works on deathball comps.
But if you are the only one tanking, then Hog isn’t the best pick. He’s best as the second tank. Whether the other tank is Reinhardt, Orisa, or even D.Va. Those are all tank combos that Hog has been in.
As for playing him, it’s really a mix of being right behind your main tank to break shields and help win the battle of attrition between the main tanks there, or moving to your supports to peel for them when they’re needed. Otherwise, it’s just a matter of two things:
Work on your tank gamesense. Reading the enemy team’s frontline; reacting to what the enemy is giving you; following your main tank and trusting your gut, etc.
Hitting your hook.
As an extension of that, knowing your optimal ranges. The hook itself is essentially a 20m “Property of Roadhog” zone. The better you can get at landing your hook, the more of a threat you’ll be. As it stands, people don’t think he’s good due to his lack of utility or shielding. His damage and the quick picks his hook can secure helps try to compensate for that. So you just need to put some practice in and get a feel for his hook until you get the hang of it. I try to maintain a 50%+ hook accuracy on him. So if you can land more than half your hooks, that’s good. Once you can do that consistently, then feel free to raise that goal to 60% and keep pushing what you can do with your hook.
Outside of your hook, his gun has two optimal ranges. One for his left click and one for his right click. I don’t know the exact ranges for them and I don’t want to put the wrong numbers here, but the range on his right click is further than his left click. I believe where his left click falloff starts is his right click’s optimal range, but again, I don’t know exactly what his ranges are so other than the “right click’s range picks up where left click ended” part, take this bit here with a grain of salt.