All elements in the same group of the periodic table have the same number of valence electrons. This made it possible to compare the valence of the alien elements to the valence of elements from our periodic table, and match the alien elements to the correct group. For example, our group 14 elements all have 4 valence electrons, so the alien element with 4 valence electrons had to be part of group 14 also.
Knowing the number of valence electrons in one of the alien elements helps in identifying it because the number of valence electrons can help categorize the alien element. Similar elements have the same valence electrons and knowing the category of the element can help further analyze the element.