In PvE, I mostly use it to clear walls and other obstacles that block line of sight. Otherwise your slow main gun may get lolblocked by some random piece of debris with a misaligned hitbox.
In PvP, it can hit some very light vehicles for additional damage while your cannon is reloading (mostly the 4-wheelers like the Kornet), destroy UAVs, pillboxes and helicopters, and of course infantry.
It can also interrupt base capture in a pinch. Not very reliable because of the very low penetration values, but you may get lucky. A trick is to slowly sweep the base with the MG, then fire your main gun in the same direction right when you see a successful interrupt. Of course this is a very last ditch attempt, normally you should know and expect when and where new objectives pop, so you can be ready for them.