Outsource synthesis when the target sequence is rare in available libraries. Synthesis also helps when you need codon optimisation for a non-native host. Use it too when the sequence needs changes, such as restriction site removal, tag insertion, or removal of toxic codons.
Synthesis is cost-effective for genes shorter than 3 kb. For these short genes, PCR-based cloning from genomic DNA is often unreliable.