An element is stable when it has a full outershell.
Generally, most shells after the first can hold 8 electrons.
The first shell can only hold 2
So in order for neon to be stable it must have a full outer shell
The first shell can hold 2
Neon has 10 electrons
10-2=8
The second shell can hold 8
And neon has 8 electrons left
So it must have 8 valence electrons to be stable