Diatomic molecules are all molecules which contain 2 atoms of the same kind. Famous ways of remembering these are (specially the second):
I bring cookies for our new home ⇒ Iodine, Bromine Chlorine, Fluoride, Oxygen, Nitrogen, Hydrogen.
Have no fear of ice cold beer ⇒ Hydrogen, Nitrogen, Fluoride, Oxygen, Iodine, Chlorine, Bromine.
Hope it helped,
BioTeacher101