Creating an isolated power supply to prevent effects of lightning
Tranformers can protect against lightning in two ways- first they have galvanic isolation from primary to secondary that is good for hundreds, and more likely, thousands of volts of transient voltage. That's good for common-mode voltage (voltage on the input leads wrt earth). Secondly, they saturate and will prevent high normal mode (across the input leads) transients which may be induced by a lightning discharge from reaching the circuit on other side (they might let double their rated voltage through, but not 10x or 100x). 

The problem with the galvanic isolation is that it may not be enough for a direct lighting strike. It's thus better to find some way to conduct the discharge to ground through a lightning arrestor (basically a spark gap) so that the voltage doesn't rise too high. For transients on telecom lines, very small spiral gas discharge tubes as "Enemy Of the State Machine" mentions are available. 

The way to deal with such a huge amount (potentially) of energy is to divert, then soak it up in some series impedance, divert again, and some more series impedance until what's left is harmless. If you try to divert or absorb it all with some small device, the end result will be a couple of disembodied smoking leads, and no small device any more. In many cases there will be a natural spark gap in the creepage and clearance distances in your input plug, switch, terminal blocks etc. but it's not always wise to depend on those, as they may break over after your transformer does. If your "first in line" transformer breaks over to ground internally, it will probably be ruined (assuming it 'tracks' through the insulation), so your second transformer may save the circuit but a service call is still required to replace the transformer.