Torbjörn is an odd hero that doesn't find a home in most competitive team compositions, but he's not entirely a troll pick. In the right circumstances, Torb can massively improve your chances of success if you have the proper skills to bring out his full potential.
Use Your Turret Wisely
The biggest mistake Torbjörn players make is spending too much time next to their turret. Often, the best use of Torb's turret is as an alternate damage source from an unexpected angle.
If the enemy team has to direct their focus to the turret, they're not damaging members of your team - which are much more important than the turret.
Splitting up from your turret means that either you or your turret are getting in damage for free while the enemy team focuses one or the other. Standing next to it, meanwhile, just sets you up as a juicy target for Pharah rockets.
When to Molten Core
Torbjörn's ult is a good way to save your turret, but it's far more useful when used to counter an enemy dive.
If the enemy team commits to diving onto the point without dispatching your turret first, a Molten Core'd turret will be able to deal significantly increased damage for free on the flank. Conversely, if they take out the turret before diving, they've likely already sustained some chip damage and will be weaker when the dive actually comes.
Molten Core will also upgrade your turret to Level 3 even if it starts at Level 1, allowing you to quickly get it functional during a fight. However, this is risky business - there's a brief delay between activating the ability and the turret upgrading during which it can be destroyed.
Don't underestimate the effectiveness of Torbjörn's armor packs. An additional 75 armor on squishy heroes like Tracer greatly increases their ability to make plays and stay in a fight.
Armoring up key allies is crucial for success - but don't overdo it by strewing armor packs around the map. Holding onto some scrap allows you to effectively heal yourself or a nearby ally for 75 HP, which can be enough to swing a skirmish or duel in your favor.