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 reasonintelligence is completely up for grabsan elusive topic. It would be in Intelligence isn't the domain ofmost tangible concept to study in an evolutionary psychology, whichcontext as the associated molecular evidence is highly criticized for it's ambiguitiescircumstantial. Unlike canonical biological evidence For example, you can't traceit's difficult to interpret what behavioral differences emerged from the molecular story with evolutionary psychology so there's essentially no physical evidence. Research psychologist Gary Marcus writes about these criticismsdifferences in his book "Kluge"; I'm not suggesting you buy the book (I've never read it) but you can see some of his presentationsreceptor distribution and read about it on wiki to familiarize yourselftypes associated with our genetic fission from the argumentscommon ancestor.
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. 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.