Intelligence has obvious advantages that can help with survival, so it
is consistent with evolutionary theory. What remains to be explained
is why human brains are significantly larger (relative to body size)
than brains of other animals. Several hypotheses have been proposed,
including the following:
Greater intelligence allows more effective foraging, especially for
learning and remembering where and when fruits ripen (Kaplan et
al. 2000).
Greater intelligence allows more effective tool invention and use.
Greater intelligence allows more successful functioning in the
complex social groups that primates form. This could be intertwined
with the development of language.
The last hypothesis is probably the most likely, although they are not
mutually exclusive.
Much of how larger brains evolved may be explained by neoteny, the
prolonging of immature periods of development. Evolving a larger brain
does not require large genetic change, just a relatively small change
to keep the brain growing for a longer time (Gould 1977).
References:
Gould, Stephen Jay, 1977. The child as man's real father. In: Ever
Since Darwin, New York: W. W. Norton, pp. 63-69.