Possibility 1: Very, very, very long body.
Upon reading just the title of the question, I immediately thought of Dinosaurs, some of which, such as Diplodocus and other sauropods were so large that some scientists had speculated that they might have had two brains (disproven for stegosaurus), one in their heads, and another lower down, in their hips.
This is so that the lower part of the body could be controlled independently, and reflexes coordinated at a faster rate, I read once that if you dropped a rock on a Sauropods tail you'd have enough time to run away before the Dinosaur's brain registered the event!
Whilst in the real world, these cases for two brains have been either disproven or seem unlikely, there is no reason why other, alien organisms may not have evolved two brains because of similar constraints.
Possibility 2: managing sleep, staying awake.
Another reason for multiple brains, as previously stated, would be to manage sleep:
Sleep? The body part needing sleep most is the brain. Now imagine a world where it's too dangerous to go to sleep, maybe one with two suns or placed in a crowded part of the universe, so that there's always enough light. Two brains might evolve to do a shift work.
However, I now point you to Dolphins which manage a similar sleep-problem by only sleeping with half their brain at once, an ability called Unihemispheric slow-wave sleep.
Whilst this sleep-pattern eliminates this need for two-brained beings on earth, there is no reason why other alien organisms wouldn't evolve two brains to conquer this problem:
Possibility 3: Improve coordination and awareness.
If multiple organisms came together to produce one organism (previous examples included the portugese man o' war and Siamese twins) then these organisms would have to be coordinated by multiple "brains."
But what conditions would cause hybrid organisms like these to become populous?
Well, the Portugese man o' war already benefits from being a siphonophore, it's almost like a normal eukaryote, all these "cells" coordinating to create an organism is actually quite efficient.
For beings like Siamese twins to evolve naturally there would have to be some strange environment, perhaps two-heads are necessary to spot dangers and predators, or extra limbs need to be coordinated independently and quickly, a set of limbs per brain.
These conditions could be imposed by faster predators, or coordinating pack animals which approach from multiple directions. Or, say the ground was unfit for living on, a species of ape could evolve which used two sets of limbs to maneuver the perilous branches of the tress above, trees which move, or hide ambushing hunters. 759