It is similar for the nuclear shell model. When adding nucleons (protons or neutrons) to a nucleus, there are certain points where the binding energy of the next nucleon is significantly less than the last one. This observation, that there are certain "magic numbers" of nucleons: 2, 8, 20, 28, 50, 82, 126 which are more tightly bound than the next higher number, that are the origin of the shell model.
Note that the shells exist for both protons and neutrons individually, so that we can speak of "magic nuclei" where one nucleon type is at a magic number, and "doubly magic nuclei", where both are.
wikipedia.org dumped 2003-03-17 with terodump