In general, in a group across the periodic table, the more basic the ion (the higher the pK of the conjugate acid) the more reactive it is as a nucleophile. Within a series of nucleophiles with the same attacking element (e.g. oxygen), the order of nucleophilicity will follow basicity. Sulfur is in general a better nucleophile than oxygen.