Bromine exists as a simple molecular structure- the Br2 molecules are held together using Van der Waals forces. Whereas Magnesium is a metal and is held together using metallic bonding. Metalic bonding constists of tighly packed positive ions surrounded by a sea of delocalised electrons and is therefore very strong. Van der Waal forces are weak. Melting is the process where a solid becomes a liquid, this means bonds must be broken. A larger amount of energy is needed to break Metallic bonds as they are stronger than Van der Waals. Therefore Magnesium has a higher melting point that Bromine.