Valence electron determines which type of how bonding will take place...
If the atom have 1 valence electron then, it can be form ionic bond with the atom who has 1 electron vacant... If atom has 4 electron in the valence shell, then it will be form covalent bond