The cyanate ion, OCN-, has three resonance structures.
(1)The first resonance structure has large formal charges (+1 and -2) which makes the structure unlikely.
(2,3)The other two resonance structures, however, each have small formal charges. In this case, electronegativity decides the best among the three. The electronegativity of oxygen (3.5) is greater than that of nitrogen (3.0). Thus oxygen is more likely to carry a negative formal charge in a Lewis structure, and according to formal charges, the resonance structure with the most negative charge is the best