The extra energy that the electron suddenly has had to come from somewhere, so I can assume that one of two things happened: either 1). A photon passed by and the electron absorbed it. or 2). Somebody hooked up a battery or a generator in such a way that the electron was bathed in a field of electrostatic potential, and suddenly had the get-up-and-go to jump to a higher energy level, and possibly even to leave its atom completely and zip over to a neighbor atom.
what can you assume has happened if an electron moves to a higher energy level