We know how the atoms in a molecule are held together, but why do molecules in a liquid or solid stick around each other? What makes the molecules attracted to one another? These forces are called intermolecular forces, and are in general much weaker than the intramolecular forces.
We have, however, already discussed a very strong type of force that is responsible for much of chemistry - electrostatics. The attraction of a positive charge with a negative charge is the force that allows for the structure of the atom, causes atoms to stick together to form molecules; both ionic and covalent, and ultimately is responsible for the formation of liquids, solids and solutions.
We already know that the electrons in the orbitals of molecules are free to move around. As such, if you would compare a "snapshots" of a molecule at an instant in time, you would see that there would be slightly different charge distributions caused by the different positions of the electrons in the orbitals. Just how much difference one sees as a function of time is based on the polarizability of the molecule, which is a measure of how well electrons can move about in their orbitals. In general, the polarizability increases as the size of the orbital increases; since the electrons are further out from the nucleus they are less strongly bound and can move about the molecule more easily.
Given that two molecules can come close together, these variations in charge can create a situation where one end of a molecule might be slightly negative and the near end of the other molecule could be slightly positive. This would result in a slight attraction of the two molecules (until the charges moved around again) but is responsible for the attractive London dispersion forces all molecules have.
However, these London dispersion forces are weak, the weakest of all the intermolecular forces. Their strength increases with increasing size (and polarizability) of the molecule.
In addition to the attractive London dispersion forces, we now have a situation where the molecule is polar. We say that the molecule has a permanent dipole. Now, the molecules line up. The positive ends end up near to another molecule's negative end:
Since this dipole is permanent, the attraction is stronger. However, we only see this sort of attraction between molecules that are polar. It is usually refered to as dipole - dipole interaction. Clearly, the strength of this attraction increases with the increasing polarity of the molecules.
In essence the three elements listed above will grab the electrons for itself, and leave the hydrogen atom with virtually no electron density (since it had only the one). Now, if another molecule comes along with a lone pair, the hydrogen will try to position itself near that lone pair in order to get some electron density back. This ends up forming a partial bond, which we describe as the hydrogen bond. The strength of this interaction, while not quite as strong as a covalent bond, is the strongest of all the intermolecular forces (except for the ionic bond).
A diagram of the hydrogen bond is here:
Could the CH2O molecule exhibit hydrogen bonding? The answer is no, since the hydrogen must be bound to either N, O, or F. Just having one of those species in the molecule is not enough.
London dispersion < dipole-dipole < H-bonding < ion-ion
Now, as these things increase in strength it becomes harder to remove the molecules from each other. Therefore, one would expect the melting and boiling points to be higher for those substances which have strong intermolecular forces. We know that it takes energy to go from a solid to a liquid to a gas. This energy is directly related to the strength of attraction between molecules in the condensed phases. Since energy is directly proportional to the temperature, the above trends ought to hold true.
In addition, there are energies associated with making these phase transitions:
Each of these processes are endothermic, and scale with the magnitude of the intermolecular forces. Thus, as these intermolecular forces increase, so do the energies requires to melt, vaporize, or sublime (go from solid to a gas) a species.
Every substance also has an associated vapor pressure with it. The vapor pressure is defined to be the amount of gas of a compound that is in equilibrium with the liquid or solid. If the intermolecular forces are weak, then molecules can break out of the solid or liquid more easily into the gas phase. Consider two different liquids, one polar one not, contained in two separate boxes. We would expect the molecules to more easily break away from the bulk for the non-polar case. This would mean that, proportionately, there are more molecules in the gas phase for the non-polar liquid. This would increase the vapor pressure. Thus, unlike the physical properties listed above, the vapor pressure of a substance decreases with increasing intermolecular forces.
Now, as an example, we will plot vapor pressure as a function of temperature for three compounds:
Which molecule corresponds to which curve?
Let us rank the species in order of increasing IM forces:
It must be stressed, that in order to figure out all of this stuff, one has to go through the process to get the correct Lewis structure and determine the polarization through VSEPR. Based on some simple rules, you can predict chemistry.