Analyze each compound: H2O consists of hydrogen and oxygen, which have a significant difference in electronegativity, leading to polar covalent bonds. O2 consists of two oxygen atoms with equal electronegativity, resulting in nonpolar covalent bonds. CH4 consists of carbon and hydrogen, which have a small difference in electronegativity, leading to nonpolar covalent bonds. NaCl consists of sodium and chlorine, which have a large difference in electronegativity, resulting in ionic bonds.