Why is fluorine a gas, bromine a liquid, and iodine a solid, at room temperature?
The reason is that the attractive forces between the molecules of these elements increase from top to bottom of the Group.
The molecules of each substance attract each other through dispersion (London) intermolecular forces.
Whether a substance is a solid, liquid, or gas depends on the balance between the kinetic energies of the molecules and their intermolecular attractions.
In fluorine, the electrons are tightly held to the nuclei. The electrons have little chance to wander to one side of the molecule, so the London dispersion forces are relatively weak.
As we move from fluorine to iodine, the electrons are further from the nuclei so the electron clouds can more easily distort. The London dispersion forces become progressively stronger.
At a low enough temperature the molecules will all be solids. At a high enough temperature they will all be gases.
It is only at temperatures between -7 °C and 59 °C that fluorine and chlorine are gases, bromine is a solid, and iodine is a solid.