When all the electrons are paired it is diamagnetic but when the unpaired electrons are present it is paramagnetic. Considering the electronic configuration of the given molecules, unpaired electron is present only in O2 which implies that it is paramagnetic.