Electrons can move between energy levels by absorbing or emitting energy in the form of photons. When an electron absorbs energy, it moves to a higher energy level, and when it emits energy, it moves to a lower energy level.