Ultraviolet–visible absorption
Molecules that absorb light at these wavelengths are called chromophores.  Chromophores are functional groups of a molecule that absorb light in this UV-Visible region.  They are most of the time characterized by delocalized pi electrons.  Pi electrons refer to a type of bond that occurs between electron orbitals called pi orbitals.  When many of these pi bonds exist in a molecule this allows electrons to be delocalized or spread out across a molecule.  An example of this type of molecule is pictured below. Many dyes (colored molecules) are characterized by these delocalized pi electrons and their color.  These molecules can be used for pH indicators to determine if a solution is acidic or basic.  The addition of acid or base disrupts the delocalized pi electrons.  This disruption causes a color change.