Bonds vibrate at specific frequencies set by their strength and the mass of the atoms involved — infrared light lets you listen in and identify functional groups directly.