From a neuroscientific point of view, our brains are really quite similar. Two mechanisms come into play during the brain's development: nature and nurture (the extent of each giving birth to a major debate over the years).
The "nature" part is our genome, which sets the ground rules. The genome means that our nervous tissue is always made of the same types of cells: neurons and glia. Additionally, from a developmental biology point of view, a human embryo develops the same way across individuals, and this is the case for brain development as well. This results in a similar structure of the brain: we all have the same components, arranged roughly the same way. We all have a cerebellum, a cerebrum, a thalamus, our cortex always has 6 layers, etc.
This is the first source of variation: for instance, Einstein was reported to have many astrocytes (a type of glia) compared to average people. However, the variation is small enough to allow us to construct very comprehensive theories of the brain.
The "nurture" part is due to the brain's plasticity. Most of the wiring in the brain, its synapses, are formed as a result of a learning process. This is where most of the variation comes from. Fundamental mechanisms of the brain are similar between individuals: for instance, the primary visual cortex shows the same kind of retinotopy for everyone, the primary motor cortex the same kind of somatotopy, most memories are stored in neuronal assemblies which can be modeled as attractor networks (e.g. Hopfield networks) to enable retrieval, etc. However, the more you move up the cognitive ladder, the more differences start to arise. For instance, people can have vastly different personalities.
The pivotal argument, however, is that we start with almost identical "hardware", and the "software" is a result of processes which can be generalized among groups of people, leading to a great deal of commonality among people, thus allowing theories to be constructed, abstracting away some of the myriad idiosyncrasies of each person. For instance, people who go through a romantic relationship are bound to react in a way that presents common aspects.
To sum it up, the more you move up the cognitive ladder, the less general rules you can come up with, and the more complex theories get.