A problem frequently encountered, even when using a good decoupling capacitor on the uC (ATMega 328 chip in this case) is getting the uC and relay to share the same power supply. This is true even when we use a flyback diode on the relay coil. Frequently an opto-coupler is used to solve the problem. This affords isolation between the supplies. That said it just is, as you mentioned, a matter of configuration.But why use an opto-coupler when you already have a driver transistor there?