Predict the number and nature of bonds using Molecular Orbital Theory
I presume you can draw the homonuclear diatomic MO diagram for these two species. 

As you probably already know, the s orbitals of the carbons form bonding and antibonding orbitals, both of which are filled. (The net effect of this is the “lone pairs” on each carbon.) 

The p orbitals for 2 pi bonds and a sigma bond. Due to s-p mixing, the pi bonds are lower in energy and are filled first, and these 2 bonds (with their 4 electrons) are the 2 bonds we see in C2. 

Add another 2 electrons to the system and you realise they fill the sigma bonding orbital, which means that the C2 2- anion has 2 pi bonds and a sigma bond (for a total bond order of 3). 

Hope this helped.