Boiling point variation ....
The boiling points of chlorine (a gas), bromine (a liquid) and iodine (a solid) are different because of the strength the intermolecular forces, the forces called London dispersion forces (one of the three kinds of van der Waals forces, the other two being Keesom forces and Debye forces).
None of molecules are polar, therefore there are no Keesom forces (dipole-dipole attraction) or Debye forces (induced attraction). The only intermolecular forces experienced by these three halogens are London dispersion forces. The strength of London forces depends on the polarizability of the molecule. The polarizability depends on the total number of electrons and the area over which they are spread. Iodine, I2, has the greatest number of electrons of the three elements, and the largest area, therefore, the strength of the London forces will be the greatest. Chlorine, Cl2, has the fewest electrons and the smallest area, and therefore, the lowest polarizability and the least intermolecular attraction and the lowest boiling point.
One other thought about London forces. Students are often told that London forces are the weakest of the three van der Waals forces and by default, less important. That turns out not to be the case. For many molecules, the strength of London dispersion forces is second only to hydrogen bonding.
Another misconception about London forces is that they are a function of the molecular weight. That is not the case. The weight of the molecules has nothing to do with the boiling point, other than a coincidental connection. Often molecules with high molecular weight will have larger numbers of electrons. It is the electron count and surface area which contribute to differences in the strength of London forces. All you need to do is compare two isomers, like C5H12. If molecular weight was the determinant, then they should have the same boiling point. They don't.
n-pentane .... CH3CH2CH2CH2CH3
neo-pentane .... 2,2-dimethylpropane
Both have the same number of number of electrons and the same molecular weight, but n-pentane boils at 36C, while neo-pentane boils at 9.5C. The difference is the greater surface area of n-pentane, which makes it more polarizable, giving it the greater London forces and the higher boiling point.