Zarya is a mix of conflicting elements, so she tends to get played poorly, not used with allies to compliment her strengths, and takes up a team slot usually reserved for a different role.
For Zarya to deal damage, she has to shield damage. For her to take damage, usually she has to be in range of a threat, so she could get isolated and focused. (try soaking tower shots against an enemy Diablo or Garrosh) If she’s not in range of a threat, then she could be ignored, become reliant on shielding an ally, who, commonly, isn’t a hero that would necessarily take damage.
So if she is taking damage, she may need an out soon, but if she isn’t taking damage, then she’s not threatening enough to worry about.
Similarly, she usually take up a spot for the bruiser/solo lane, but she any time she’d shield herself, the enemy solo will just wait, starve her for energy, and leave her unable to contest the lane. She also doesn’t do well on taking merc camps on her own, so the usual team compositions don’t suit zarya for being a ‘bruiser’ replacement.
Lastly, a lot of players take terrible talents. More often than not, they take grenades because being able to stand further back keeps her from getting isolated, and she has the range that most bruisers don’t. However, players tend to cycle abilities (esp those without mana costs) on cooldown, so her positioning gets very predictable; if she’s going to run in, she’s going to shield herself to try to soak damage, and then back off to grenade. That sort of pattern is easy to work around, leaves zarya starved of energy, and then the grenades (taken on every tier -,-) end up as fluff damage.
Players then conclude she’s “niche” or terrible, and don’t bother trying anything different. They don’t take talents to bolster her resource stability, spend most the game starved for energy, and call it quits.
As others have suggested, her trait talent at 1 really offsets some of her resource management; getting energy from globes frees up some of the use of her shields, so she’s not as predictable to deny additional energy. Once she has energy, she can clear waves, get more globes, and sustain her high energy keeping her a relevant threat.
Together we are Strong offsets most of her energy weakness, but makes her very reliant on a battery-type hero, ala Auriel and Feel the Heat is a fantastic bump in damage, but is generally better for objectives & siege so stuff can’t just walk away from her as she doesn’t stutter-step too well.
Her extra shield at 13 (soaks up her energy) tends to be neglected because players don’t realize “oh hey, its a shield, it can be used to generate the energy it lost” and it lasts long-enough to cycle regular shield, talent shield, then regular shield again. Add on the lvl 20 shield refresh, and she’ll have shields for days. Shields for Days!
At 20, a 0 energy zarya does like 44 damage a tick; with full energy and Feel the Heat, she’s rocking like 196 damage a tick. She’s a very hit & miss character on her performance.
While regular play can seem lackluster, she’s a supestar on brawls. There’ so much incidental damage to not hit Zarya that it becomes cake to keep her energy topped off, and with lots of enemies and globes around, any sort of quest is cake to finish. Being able to shield/armor/cleanse allies is a super boon, so if there’s ever a time to give her a go, its def with an -aram pick.