How do I use the fact that each element has a different set of energy levels to explain why the colour of the light emitted by an element in the gaseous state is characteristic of the element?

Energy affects frequency and frequency determines wavelenght. The color of an element depends on the wavelength.

Equations for further Proof:
E = hv
(Energy) = (Planck's constant)(frequency)

[[lambda]] = h/mv
wavelength = (Planck's constant)/(mass)(frequency)