The boiling point of a liquid depends on the intermolecular forces present between the atoms or molecules in the liquid since you must disrupt those forces to change from a liquid to a gas. The stronger the intermolecular forces, the higher the boiling point.
Two oxygen molecules are attracted to each other through London dispersion forces (induced temporary dipoles between the molecules) while water molecules are attracted to each other by hydrogen bonding (attraction of the + dipole on H in one molecule to the – dipole on an oxygen in an adjacent molecule) that is relatively strong. (Hydrogen bonding is an important intermolecular force for molecules where H is directly covalently bonded to F, O or N, which are quite electronegative and thus form bond with H with a relatively strong dipole.) London dispersion forces become more important for atoms and molecules with more electrons. Dipole–dipole attractions are also important in some molecules.