The simple answer is: only when absolutely forced to. But what constitutes force?
Before the introduction of System Integrity Protection (SIP), it was not difficult for rogue apps and other software to wreak havoc in a system folder. Indeed, some older versions of Mac OS X were quite capable of making a mess of themselves, and didn’t need third-party assistance.
SIP was introduced with El Capitan, and has toughened up to cover all the system areas used by macOS, even the many apps which are installed with macOS. Although its not entirely impossible for these to become corrupted, the most likely causes of that now are hardware failure – your startup disk is breaking – or during macOS update installation, when SIP is suspended by Apple’s specially-signed installer.
The only exception to this is if you have two or more bootable drives: SIP only applies to the current startup disk. So you (or software) could damage the copy of macOS on a non-startup bootable disk.
So if most of the reasons for re-installing macOS have gone, what remains?
If your normal installation of macOS is so badly borked that it can’t start up properly, then it may be worth considering re-installing it. This most commonly occurs after a macOS update, when the preferred solution is to download and install the Combo update if you can. If you can’t devise a way of doing that, or if you have already tried it, then re-installing macOS may be your next option.
If you have had to start up in Recovery mode, and the tools there tell you that what you think is your startup disk cannot be booted, then you have few options other than to re-install. Unless a macOS install or update has gone badly wrong, the most likely cause of this is hardware failure, which will probably take you to hardware diagnostics or AHT anyway.
The other situation which you may find yourself in is having to downgrade back to an older version of macOS, which necessitates a full re-install of it. The reasons for this should be very few and far between, but for some it is the best way to recover when an upgrade (or update) breaks something essential.
In almost every other case in which someone might suggest that you try re-installing macOS, it will prove to be a bad idea – at best, a waste of a great deal of your time and effort, and at worst you could end up making your problems even greater. macOS is not like older versions of Windows (or even Mac OS X): re-installing is not a panacea which could solve many tricky problems.
If you’re having problems with macOS, particularly if it is just after a macOS update, then the panacea of choice is normally a Combo update. It is far better, though, if you can come up with a more specific diagnosis, which may well offer a much simpler solution. Sometimes, that can be as little as trashing a preferences file, or setting a pane in System Preferences properly.
One final caution which you must bear in mind before starting up in Recovery mode and re-installing macOS: consider using local Recovery mode (Command-R) when you can, rather than remote or online Recovery modes (Command-Option-R, or Command-Option-Shift-R), as it should be considerably quicker. However, these modes have recently become very complex, and before re-installing from Recovery mode, work carefully through my flowchart to decide which mode will provide you with the right version of macOS.
(Updated 16 May 2017 to reflect changes in reinstallation introduced with macOS 10.12.4.)