Bromine is molecular, existing as Br2 molecules, wheras magnesium is metallic and therefore exists in a large macromolecular structure. In bromine there are strong INTERmolecular covalent bonds, but only weak INTRAmolecular Van der Waals forces. It is these weak INTRAmolecular forces that must be overcome for bromine to boil. Magnesium exists as a large macromolecular structure (ie.a large interconnected lattice NOT molecules) with strong metallic bonds between the Magnesium ions and the sea of delocalised electrons. In orser for magnesium to boil these strong metallic bonds must be broken. It takes more energy (in the form of heat) to overcome the stronger metallic bonds in magnesium than the weaker INTRAmolecular Van der Waals forces in bromine, therefore magnesium has a higher boiling point than bromine.