There has been quite a bit of study of the relationships between brain size, body size, and other variables across a wide range of species, largely because the easiest way to study any object is to measure its size. Even for extinct species brain size can be estimated by measuring the cavity inside the skull. The story that emerges, however, is complex.
As might be expected, brain size tends to increase with body size (measured by weight, which is roughly equivalent to volume). The relationship is not a strict proportionality, though: averaging across all orders of mammals, it follows a power law, with an exponent of about 0.75. There are good reasons for expecting a power law: for example, the body-size-to-body-length relationship follows a power law with an exponent of 0.33, and the body-size-to-surface-area relationship a power law with an exponent of 0.67. The explanation for an exponent of 0.75 is not obvious—however it is worth noting that several physiological variables appear to be related to body size by approximately the same exponent, for example, the basal metabolic rate. This power law formula applies to the "average" brain of mammals taken as a whole, but each family (cats, rodents, primates, etc) departs from it to some degree, in a way that generally reflects the overall "sophistication" of behavior. Primates, for a given body size, have brains 5 to 10 times as large as the formula predicts. Predators tend to have relatively larger brains than the animals they prey on; placental mammals (the great majority) have relatively larger brains than marsupials such as the opossum.
When the mammalian brain increases in size, not all parts increase at the same rate. In particular, the larger the brain of a species, the greater the fraction taken up by the cortex. Thus, in the species with the largest brains, most of their volume is filled with cortex: this applies not only to humans, but also to animals such as dolphins, whales, or elephants.
The evolution of homo sapiens over the past two million years has been marked by a steady increase in brain size, but much of it can be accounted for by corresponding increases in body size. There are, however, many departures from the trend that are difficult to explain in a systematic way: in particular, the appearance of modern man about 100,000 years ago was marked by a decrease in body size at the same time as an increase in brain size. Even so, it is notorious that Neanderthals, which went extinct about 40,000 years ago, had larger brains than modern homo sapiens.
Not all investigators are happy with the amount of attention that has been paid to brain size. Roth and Dicke, for example, have argued that factors other than size are more highly correlated with intelligence, such as the number of cortical neurons and the speed of their connections. Moreover they point out that intelligence depends not just on the amount of brain tissue, but on the details of how it is structured.