Accounting for the trends

The electrons on an atom are in orbitals. 

The orbitals of similar energy are in shells which are labelled with a number known as the principal quantum number.

Electrons in shells with higher principal quantum numbers are on average farther from the nucleus.
The cartoon shows a slice through an atom that has electrons in shells 1, 2 and 3.  
 
The size of an atom depends on how many shells are occupied and on the effective nuclear charge at the outer electrons. 

These two effects oppose one another.  When comparing two atoms from the same group in the periodic table,
the atom with more shells occupied is larger.

This means that atom size increases going down a group in the periodic table. 
Group 1:  Li (1s2 2s1) is smaller than Na (1s2 2s2p6 3s1) which is smaller than K (1s2 2s2p6 3s2p6 4s1).
However the increase going down the group is smaller than would be anticipated to the increase in the nuclear charge.


if the same number of shells are occupied,
the atom with the higher nuclear charge at the outer electrons is smaller.
However the decrease in size is not as great as would be expected because the outer electrons do not experience the full nuclear charge.
 
What determines the effective nuclear charge at the outer electrons?
The effective nuclear charge at the outer electrons depends on
how many electrons are in the outer shell AND on how many electrons are in shells between the outer shell and the nucleus.

Electrons in shells closer to the nucleus contribute more to the reduction of nuclear charge (shielding) at an outer electron than electrons in the same shell.
This is common sense because an electron in an inner shell is more likely to be between the nucleus and electrons in an outer shell.

A set of guidelines known as Slater's rules puts this on a quantitative basis, but the numbers are not as important as the idea.
Each electron in a shell closer to the nucleus cancels roughly 0.85 of the charge on one proton.
An estimate of the effective nuclear charge on the outer electron on Li (1s2 2s1) is +3 - 2 × 0.85 = +1.3

Each electron in the same shell cancels roughly 0.35 of the charge on one proton.
An estimate of the effective nuclear charge on an outer electron on Be (1s2 2s2) is +4 - 2 × 0.85 - 0.35 × 1 = +1.95

Atoms with outer electrons in the same shell, have a higher effective nuclear charge if their nuclear charge is larger.
This means that atomic size decreases going across a period (row) in the periodic table. 
For period 2:  Li  (1s2 2s1) > Be 1s2 2s> B 1s2 2s2p1 (effective nuclear charge 2.6)