After a building is destroyed, your units will focus on the next nearest building. Many bases will interleave turrets with support buildings (like power storage or munitions drops), so that your units get distracted attacking those other buildings. If your units can destroy the support buildings without taking much damage in the process, leaving them to do so is fine since destroying buildings gives you combat energy. But if it takes them too long to attack the support buildings, you may want to use beacon to focus down the turrets.
This partly comes from experience, but as a rule of thumb, slower units (e.g. glaives) and units with higher damage per second (e.g. jetbikes) generally benefit from attacking support buildings, while faster units (e.g. terminators), and units with lower damage per second (e.g. dreadnoughts) generally are better off using beacon. This is because the time it takes to move to the next turret is much smaller/larger than the time it takes to destroy the support buildings in the way.
Note: The more you use beacon, the more expensive it gets, and the more likely you are to not be able to afford it. Be careful you don't get trapped in a situation where your units are attacking the HQ while turrets are still firing when and you don't have enough combat energy to beacon them away.