@rmim, the Photon GPIO pins can only provide 3.3v and at most 20mA of current. The Arduino GPIO pins provide 5v and a maximum 40mA current. You cannot drive the relay directly from the Photon and will need to use a driving transistor (bipolar or mosfet) to drive the relay.
The 7805 absolutely needs the input and output capacitors or it can oscillate and self-destruct as you found out.
As for grounds, the strikes are powered through the relay and does not need to be common with the Photon GND. You need to keep the 12V supply AWAY from the Photon. I am assuming your relay ground is connected to the Photon ground which is necessary. I am not sure how you configured the (single) diode across the relay. This diode provide protection from inductive kickback voltage produced by the relay coil as it is de-energized.
Using the USB to power the Photon and relay, you will want to:
- Make sure to use a good quality USB power supply that can supply 1A
- Add a large (470uF) capacitor between the Vin pin and GND of the Photon to handle current spikes
- Use a transistor to drive the relay from the Photon GPIO pin (see diagram). Instead of 3.3V use Vin (approx 5v). The D1 diode can be whatever you are currently using. You can use a 390 ohm resistor for R1 if the relay doesn’t close firmly.