Let's first be clear that we didn't evolve from monkeys/apes/etc.  That's a common misconception.  Evolution states that we and monkeys/apes/etc. evolved from a common ancestor.  Same with fish.  If you go back far enough, we and fish share a common ancestor... we did not, however, evolve from today's Salmon or Macaque.

That being said, the origin of reason is completely up for grabs.  It would be in the domain of evolutionary psychology, which is highly criticized for it's ambiguities.  Unlike canonical biological evidence, you can't trace the molecular story with evolutionary psychology so there's essentially no physical evidence.  Research psychologist Gary Marcus writes about these criticisms in his book "Kluge"; I'm not suggesting you buy the book (I've never read it) but you can see some of his presentations and read about it on wiki to familiarize yourself with the arguments.

Now that we've said that, there's several theories; many of them stem from language.  It is thought that the articulation allowed by language allows us to more carefully think about things... but there's always the possibility that the reasoning came first and facilitated the language.

One of the more interesting theories I've read is [the bicameral mind](http://en.wikipedia.org/wiki/Bicameralism_(psychology)).  Of course, note the criticisms against it:

"It is one of those books that is either complete rubbish or a work of consummate genius, nothing in between! Probably the former, but I'm hedging my bets."
-Richard Dawkins

Others argue that [human consciousness is a social construct](http://journals.cambridge.org/action/displayAbstract?fromPage=online&aid=30921).