The electronic configuration of C is 1s22s22p2..
Consider formation of two sp−hybrid orbitals, one directed toward oxygen and directed 180o opposite.
This contains carbon lone pair, leaving empty sp hybrid orbitals with a filled oxygen σ-orbital.
To complete the octet, C forms a pi bond and a dative bond.
Hence, the valence bond structure of carbon monoxide is best described as :C≡O with a dative bond from oxygen atom to the less electronegative carbon atom.