The seven diatomic molecules are hydrogen, nitrogen, oxygen, fluorine, chlorine, iodine, and bromine. This means that whenever they are in a balanced equation, they will have two such as H₂ (hydrogen) or N₂ (nitrogen).
2Na+2HCl --> 2NaCl+H
If you look, your equation is not balanced. There are 2 sodiums and 2 chlorines on both sides, however there are 2 hydrogens on the left and 1 hydrogen on the right. Since hydrogen is a diatomic molecule, it is not allowed to be in the form "H" on the right. I'm assuming before it looked like "H₂" (the correct form) but the computer took out the subscript.
Therefore, hydrogen is the diatomic molecule in this equation.