In diamagnetic species all the electrons are paired when we write configuration according to molecular orbital theory. Whereas a paramagnetic species has at least one unpaired electron.
(i) O2=(8+8=16) =σ1s2,σ∗1s2,σ2s2,σ∗2s2, σ2pz2,π2px2,π2py2,π∗2px1,π∗2py1 ∵ It has two unpaired electrons. ∴ It is paramagnetic.
(ii) B2=(5+5=10) =σ1s2,σ∗1s2,σ2s2,σ∗2s2, π2px1,π2py1 ∵ It has two unpaired electrons. ∴ It is paramagnetic.
(iii) N2+=(7+7−1=13)= σ1s2,σ∗1s2,σ2s2,σ∗2s,π2px2,πpy2,σpz1 ∵ It has one unpaired electron. ∴ It is paramagnetic.