( Light ( ( is ( ( ( emitted ( when ( ( an atom ) ( loses ( an electron ) ) ) ) ) , ) ( thereby ( changing ( to ( a ( lower ( energy level ) ) ) ) ) ) ) ) . ) )
(ROOT (S (NP (NNP Light)) (VP (VBZ is) (VP (VBN emitted) (SBAR (WHADVP (WRB when)) (S (NP (DT an) (NN atom)) (VP (VBZ loses) (NP (DT an) (NN electron))))) (, ,) (S (ADVP (RB thereby)) (VP (VBG changing) (PP (TO to) (NP (DT a) (JJR lower) (NN energy) (NN level))))))) (. .)))
Light is emitted when an atom loses an electron, thereby changing to a lower energy level.
(ROOT (S (SBAR (WHADVP (WRB When)) (S (NP (NNS electrons)) (VP (VB return) (PP (TO to) (NP (DT a) (JJR lower) (NN energy) (NN level)))))) (, ,) (NP (PRP they)) (VP (VBP emit) (NP (NP (DT the) (JJ excess) (NN energy)) (PP (IN in) (NP (NP (DT the) (NN form)) (PP (IN of) (NP (NN light))))))) (. .)))