A soldering gun is a very, very high powered device and is made for soldering rather heavy pieces. Pieces that you’re not likely to find on a printed circuit board.
You may find heavy connectors or pieces of brass or other things that have a lot of mass to them. These may require higher heat than you’re able to get from a smaller soldering iron, which may only put out 10s or 100 watts.
So you’re not likely to encounter soldering gun in a typical electronic soldering project. But you may find this useful for heavy connectors and other things that may require more heat than your typical printed circuit board. And it reaches temperatures much, much higher than you get with a soldering iron.
And it’s useful for soldering very heavy parts that we’re not likely to encounter on a printed circuit board but perhaps electronic connector or something with high power. As it can reach really high temperature, you’d better take care of yourself. Keep in mind that allow it to cool before you set it down or forget it.