When should I replace the nozzle on my printer?
Replacing the nozzle depends on many things,


the nozzle material (copper/brass, steel, hardened steel, Olsson Ruby Nozzle),
the type of filament you print,
how frequently you use the 3D printer. 


To replace a nozzle, there are probably a few reasons for doing so. A nozzle can wear out (see: How to identify nozzle wear; not only from the friction  of standard filament, but especially when used with abrasive filament like glow-in-the-dark PLA, and glass or carbon fibre filled filament) causing the outer shape and the inner nozzle diameter to change size. This can result in lower quality prints or difficulty in getting the print to stick to the bed. Having a metal wire or drill bit of the diameter of the nozzle will tell you if the hole itself has worn out. Sometimes, a visual inspection may sometimes be enough for you to tell that it has worn out: 



(source: filament2print.com)

Please note that an interesting video is posted by Stefan from CNC Kitchen on nozzle wear:


                
            

Nozzles can collect burned particles inside, partly clogging the nozzle, causing the extrusion to be non-ideal. A sign for this is when the filament is not leaving the nozzle straight when freely extruded at height, but curls up.

Furthermore, when used frequently, nozzles can get coated with filament which is sometimes hard to remove. This sometimes causes freshly extruded filament to stick to the nozzle, certainly if it curls up like mentioned before.

Note that nozzles are very cheap with respect to the complete assembly and replacing them is a matter of 2 minutes work. So if you're unsure about how to improve the quality of printing after having tried fixing flow rate and nozzle to bed height, you could replace the nozzle, see e.g.:



(source: The 3D Print General)

Depending on the quality of the nozzle and the filament, a nozzle replacement for one brand might be necessary much sooner than for another printer. E.g. my Ultimaker 3E has literally printed kilometers of PETG without the need to replace the nozzle (or "core" as it is called for this printer), while the brass nozzle of my first cheap, now dust collecting, Anet A8 printer has been replaced a few times.