The valence electrons of transition metals are found in d-orbitals. When the metal ion forms a complex with ligands the d-orbitals split into two different energy levels, and the gap between these levels happens to correspond with that of visible light.
This means that when the electrons in the lower level are promoted to the higher level part of the visible spectrum is absorbed - leading to the reflected light being coloured.