The correct statement is: They have valence electrons in the same energy level.
Nitrogen (atomic number 7) and oxygen (atomic number 8) are both located in period 2 of the periodic table, which means they have their valence electrons in the second energy level.