Bond length comparison between two carbon atoms
In the case of a carbon-carbon single bond, 2 electrons are shared in the bond connecting the two carbon atoms. With a carbon-carbon double bond, 4 electrons are shared between the two carbon atoms and 6 electrons are shared in a triple bond.  Having additional electrons between the two atoms 1) improves the bonding overlap (makes the bond stronger) between the two carbon atoms and 2) better screens the two carbon nuclei form each other.  

Both of these factors, better bonding overlap and better nuclear screening, will allow the two carbon atoms to approach closer together.  Consequently, the more electrons (or the more bonds) between two carbon atoms, the shorter the distance between them.