Does the output bypass capacitor of an LM7805 double as a decoupling capacitor?
Decoupling capacitors should normally be placed as close as practical to the power supply and ground pins of their associated IC.

You should have capacitors at the output of the 7805 and at the ATMEGA328.