$C_2H_2Cl_2$
Step 1: Sigma ($\sigma$) bonds are single bonds, while pi ($\pi$) bonds are additional bonds in double or triple bonds.
Step 2: Analyzing each molecule:
$N_2$ has 1 $\sigma$ and 2 $\pi$ bonds.
$C_2H_6$ has only $\sigma$ bonds.
$N_2F_2$ has only $\sigma$ bonds.
$HCN$ has a triple bond between C and N, meaning 1 $\sigma$ and 2 $\pi$ bonds between them. Additionally, a $\sigma$ bond exists between H and C.
$C_2H_2Cl_2$ has different bonding but does not match the criteria.
Step 3: Since HCN has exactly 2 sigma bonds and 2 pi bonds, the correct answer is (D).