The ground state electronic configuration of 'C' is 1s2 2s2 2px1 2py1 . There are only two unpaired electrons in the ground state. However, the valency of carbon is four i.e., it forms 4 bonds. In order to form four bonds, there must be four unpaired electrons. Hence carbon promotes one of its 2s electron into the empty 2pz orbital in the excited state. Thus in the excited state, the electronic configuration of carbon is 1s2 2s1 2px1 2py1 2pz1 .
Each carbon atom undergoes 'sp' hybridization by using a 2s and one 2p orbitals in the excited state to give two half filled 'sp' orbitals, which are arranged linearly.
The two carbon atoms form a σsp-sp bond with each other by using sp-orbitals.
However there are also two unhybridized p orbitals i.e., 2py and 2pz on each carbon atom which are perpendicular to the sp hybrid orbitals. These orbitals form two πp-p bonds between the two carbon atoms.
Thus a triple bond (including one σsp-sp bond & two πp-p bonds ) is formed between carbon atoms. Each carbon also forms a σsp-s bond with the hydrogen atom. Thus acetylene molecule is linear with 180° of bond angle.