There are only seven diatomic elements that default to this double bond. Five of them — hydrogen, nitrogen, fluorine, oxygen and chlorine — are gases at room temperature and normal pressure. They also go by the name "elemental gases."
Bromine is always a liquid, while iodine can be a liquid or solid when at room temperature, depending on several factors. All seven are nonmetallic.
Diatomic elements are not rare — on the contrary! Nitrogen and oxygen, in their diatomic forms N2 and O2, make up 99 percent of the atmosphere on Earth. That's the opposite of rare.
Diatomic Molecules
Other elements can bond with diatomic elements to form diatomic molecules. That's how we get table salt (sodium + chlorine = NaCl, sodium chloride).
You can find a diatomic molecule everywhere. Some other elements can form diatomic molecules, but the bonds are very weak and unstable. They don't stay diatomic for long. Only the seven diatomic elements form strong bonds and appear in this form almost always.