Powering an old train crossing gate (semaphore) with a PC power supply and Arduino
I'm assuming that your train crossing light uses 12V DC, but even if it uses some other voltage that your PC power supply provides, the same principle applies:

I would not switch the power supply on and off at a frequency of 1-2s. A PC power supply is simply not made to do that, and because of the self-test it performs which can take a few hundred ms.

Instead I would recommend that the power supply be continuously on, use the 5V output to power the Arduino, and the 12V output to power the flashing light through a relay or transistor which the Arduino controls. The current requirement of the bulb would determine whether using a relay or transistor is more practical, but if you need to use a relay, you will also need a transistor to drive the relay. Check out some other answers about switching a load on and off from digital output pins.

If you don't want to have a PC power supply running all of the time because of the noise, consider obtaining a different power supply which is passively cooled. Just make sure it can supply enough current for the flashing bulb. You can find dual output supplies that are 5V and 12V, or you can opt for a single rail with 12V only, and drop the voltage for the Arduino using a linear or switching regulator (buck converter).