For the main group elements (Groups 1, 2, 13 - 18), the valence electrons for the atoms of an element are located in the outermost (highest energy) s and p sublevels.
The electron configuration of krypton is
Some would write the electron configuration as
Here is a video which discusses how to draw Lewis structures for atoms showing their number of valence electrons.
Video from: Noel Pauller
When atoms react, they share, gain, or lose electrons in order to achieve an octet (8) of valence electrons, except for hydrogen, which reacts to get 2 valence electrons like helium, the first noble gas. This gives the bonded atoms the electron configuration of a noble gas, making them stable.