Atoms form two types of bonds: ionic and covalent. Ionic bonds, which are common between elements in Group 1 of the periodic table (metals) and those in Group 17 (halogens), occur when one atom loses an electron and another atom acquires it. Both atoms become charged ions and attract each other electrostatically. Covalent bonds occur when atoms share electron pairs. These bonds can be polar or non-polar, and that makes a difference. Polar molecules are electrically neutral, but arrange themselves in such a way as to give the molecule a net charge difference between one end and the other. They will dissolve in water to varying degrees because the water molecule is polar, whereas non-polar molecules won't.
TL;DR (Too Long; Didn't Read)
The relative electronegativity of the atoms forming a molecule is the prime determinant of whether the molecule is polar or not.
American chemist Linus Pauling was the first person to describe the phenomenon of electronegativity, which he defined as “the power of an atom in a molecule to attract electrons to itself.” He created a dimensionless unit determined by the atomic number of the element in question and the distance of the valence electrons from the nucleus. He then created a scale by defining the electronegativity of fluorine (F), the most electronegative element, as 4.0 and computing relative electronegativities for the other elements.
After assigning each element a value, Pauling noticed two trends. Electronegativity increases from left to right in the periodic table, and it also increases from bottom to top in each group. According to this trend, Francium (Fr), at the bottom of Group 1, is the element with the least electronegativity. It has a value of 0.7 compared with the maximum value of 4.0 assigned to fluorine.
Electronegativity and Polarity
The difference in electronegativity between atoms provides a general way to tell what type of molecule they will form. A difference greater than 2.0 indicates an ionic bond, while a difference of less than 0.5 indicates a non-polar covalent bond. A difference between 0.5 and 2.0 indicates a polar covalent bond. Some periodic tables display electronegativity values, but you can also find charts that list only electronegativity.
Example: Hydrogen (H) has an electronegativity of 2.1, while that of oxygen (O) is 3.5. The difference is 1.4, which indicates the water molecule is polar.
Non-Polar Molecules Can Combine to Form Polar Ones
Molecular polarity depends also on symmetry. You can tell the water molecule is polar because of the difference in electronegativity between hydrogen and oxygen, but the asymmetrical arrangement of the hydrogens on the oxygen also contribute to the charge difference between the two sides of the molecule. In general, large molecules that contain smaller polar molecules are polar, but if all the atomic combinations that comprise a molecule are non-polar, the large molecule can still be polar. It depends on the arrangements of the atoms around the central one, which you can predict using a Lewis dot diagram.