My house is 54 y/o. Years ago the circuit panel was upgraded to all 20 amps with the exception of the AC and oven. I am adding a can light which uses 12 - 18 gauge wire. I chose 14 gauge. I am wanting to tie it in to the existing on/off switch which I believe may be wired with 12 gauge wire. Is it safe to tie in the 14 gauge to the 12?
Go for it, but you will need to change the breaker in that panel to 15A. Also put a tag on the #12 wire going to that breaker that says "#14 wire in circuit".
Also, any 20A receptacles on that circuit (Ms. Winky) must be changed to 15A receptacles (Ms. Horror).
Also, if the hardwired loads on that circuit total 7.5A or more, you cannot have any receptacles at all, or the loads must be changed to smaller draw loads.
Still want to do that?
What does the switch currently switch? Were you going to do the splice at the existing light fixture or in the box itself (not sure why you'd do this, and you'll probably have space or missing neutral issues).
You should check the breaker that controls the switch's circuit. If it's 20A (likely with 12 gauge wire) and you want to continue with 14 gauge wire, you must verify your loads and downsize the breaker to 15A. You're probably better served just continuing with 12 gauge. If your existing wiring is aluminum, you must also splice to new copper wiring with a Al/Cu nut to avoid corrosion.