Attention, memory and perception
Law of proximity
Also called Juxtaposition, Gestalt grouping
Things placed close together are seen as belonging together, so spacing alone can group or separate parts of a screen.
The eye groups what's near before it reads anything. A label closer to the field below it than the one above is read as belonging to that field.
Use space to show structure: tight spacing within a group, more between groups. It often removes the need for lines and boxes.
In practice
A settings page that spaces each group of options apart reads clearly without any dividers.
Common mistake
Equal spacing everywhere, which makes a form look like one long list and labels float between fields.
Where it comes from
One of the Gestalt principles of grouping set out by psychologist Max Wertheimer in 1923.