Atmega328p resets and crashes when powering up solenoids
Cut that trace running up from pin 22 and jumper it directly back to the middle pin on the 7805 with a fly wire. 

Add a 10uF X7R or X5R cap directly between pin 7 and 8. 

Make the layout better next time or use a 4-layer board.