Both are situational.
For the chaingun, you wanna use it on high pain chance enemies1. And for that, it works. It also just generally gets rid of enemies really quick with low ammo.2
But the BFG has it's use too, for mainly the beefier enemies.3
One is not better than the other necessarily, they're both very useful.
1: Cacodemons, Lost Souls, especially Pain Elementals, Arachnatrons, and Mancubi.
2: Zombiegunners, Imps, Sergeants, Heavy Weapon Dudes, Pinkies, Spectres, and SS.
3: Archviles, Barons, CyberDemons, and Spider-Masterminds.