A prism or a diffraction grating can be used to separate the colours in light
emitted from electrically excited atoms. The frequencies of light is proportional
to the energy of the photons emitted by the atoms. The spectrum of light
emitted by specific atoms (like hydrogen and neon in this case) can be related
to the separation between energy levels in the atoms.
In a laser, electrons in some of the atoms can be excited to energy levels where
they get stuck for a short while. Photons of the same frequency as the light
that is emitted when the electrons drop from such energy levels can
stimulate the emission of such photons. This picture shows the tube from
a helium-neon laser, some laser pointers, some diffraction gratings, a lucite rod that can be used to
demonstrate total internal reflection, the principle behind fibre optics. The
pattern of bight and dark regions (interference) resulting when light passes
through an array of slits or a grating demonstrates the wave nature of light and
can be used to measure wavelength.