CO is a polar molecule whereas N2 is non polar. Both of them contains three covalent bonds. In nitrogen molecule the lone pair on each nitrogen atom repel each other which can decrease the bond strength by some extent. In CO both carbon and nitrogen atom contain lone pairs, but the repulsion between them is less because the space occupied by the lone pairs is different. The lone pair on oxygen occupy smaller space than that of carbon which is less electronegative than oxygen. Another factor is that CO contains some ionic character which is more than that of N2.