It is easy to conjure a mental picture of an atom as some sort of fuzzy ball of electrons around a small, central, heavy nucleus. But most atoms, when they are free (and of course most elements are not found as free atoms in nature), are not spherical. Here we examine the conditions that must be met to make an atom spherical.
We know that only the s (l = 0) orbitals are spherical. Thus, the ground state of H, 1s1, is spherical. Likewise, the ground state of He with the configuration 1s2 is also spherical, as is Li (1s2 2s1) and Be (1s2 2s2). These first four elements have only s electrons and are spherical.
When we move to the next element, B, we have one electron in a non-spherical p orbital: 1s2 2s2 2p1, and the B atom is not spherical. It has the shape of a p orbital centered on the spherical 1s2 2s2 Be core of electrons. But not all atoms with p electrons are non-spherical. According to the aufbau principle, we add electrons into a p subshell one at a time, giving each a different m quantum number, so that as we move from B to C to N, we find N having one electron in the 2px orbital, one in 2py, and the last in 2pz. There is a mathematical theorem (called Unsold's Theorem) that has something to say about the wavefunctions of an atom like N: whenever a sub-shell is filled or half-filled, the total wavefunction squared (which gives the spatial probability distribution for the atom's electrons) is spherically symmetric. Thus, N is spherical, but B and C are not. Continuing past N, we can state that O and F are not spherical, but Ne, with a filled p sub-shell, is.
This rule holds for d and f sub-shells as well. Consider the five d orbitals. These have the shapes and orientations shown below in the form of the pictures we introduced for H atom:
If we overlay these five pictures, as the animation below is doing, we can see that when all five are overlayed with equal weight (which happens when the d sub-shell is either full or half full), a spherically symmetric probability pattern emerges.
In conclusion, we can now pick out the spherical atoms in the Periodic Table quite easily. Shape is just another periodic property of the elements.