Water makes a good solvent because of its composition of positively and negatively charged molecules that allow it to attract to a variety of substances. With a molecular formula of H2O, water has a positive electrical charge at the hydrogen atom and a negative electrical charge at the oxygen atom.
When water encounters a substances with a charge, it can disrupt the forces that hold the charge together, resulting in a dissolution of the compound. Sodium chloride, molecular formula NaCl—also known as salt—has a positively charged sodium ion and a negatively charged chloride ion. Water's positive and negative ions attract the compound and disrupts the ionic bonds that holds it together, dissolving the sodium chloride.