Does the distance between an electron and the nucleus change for excitation and relaxation?
Yes.

The Bohr model shows the atom as a small, positively charged nucleus surrounded by orbiting electrons. 



Electrons undergo exothermic or endothermic reactions during ground state or excited state. When the electrons move from ground state to excited state, it means that they gain more energy, resulting in higher energy levels (higher energy shells), and this causes the electrons to orbit further from the nucleus. The same explanation is applicable when electrons move from excited state to ground stage- the electrons lose energy and this results in lower energy levels (lower energy shells), causing the electrons to orbit nearer to the nucleus.