there can be multiple reasons for this like layout, circuit etc., here are some thoughts:
1. All regulators are connected in cascade which is a bad power design. In this case, 7824 has to provide all the power for the board. U have to be sure if 7824 can provide handle that load i.e. current usage of board does not cross 1A max. Since, u r getting any issues during normal operating condition, i guess that problem is kind of sorted out. But still its bad design. Every regulator is better take input directly from rectifier output. This also makes 7824 generate lots of heat resulting in lots of power wastage or dissipation.
2. Linear regulators are less efficient and words on non switching technology, so the chance of power harmonics are less but not 0 due to power surges. Make sure, every section has separate space on board like power section, analog section digital section, filter section etc. This reduces interference due to coupling of circuit due to stray capacitance and inductance. Use decoupling and bypass caps ate every IC. A very usual cause is poorly decoupled circuit.
3. In layout, keep ground plane near MCU and behind MCU, to decouple any switching noise.
4. Switching on and off a motor i.e. fan takes sudden current due to increase in load, may discharge all caps on Vcc. Make sure power circuit is not loading. The brown out may be responsible for MCU to reset.
The exact answer requires complete layout and circuit. Since, it can be due to multiple reasons, i hope these suggestions may help.
Thanks