Mechanism involved in bromine water test $$\ce{CH3CH=CH2 -&gt;[Br2] CH3-CHBr-CH2Br}$$


In the reaction mechanism, why does the nucleophile attack at the 2nd carbon atom? Shouldn't it attack at the 1st one, so that in the transition state, the carbanion is relatively more stable?
There are no carbanion in this reaction.
In bromine water, $\ce{Br2}$ is partially made of $\ce{Br+}$ and $\ce{Br-}$ ions. Then $\ce{Br+}$ attacks the double bond, producing a carbocation, with $\ce{Br}$ at the outer $\ce{C}$ atom, and the + charge on the central $\ce{C}$ atom. This is the most stable carbocation. Then it will react with the $\ce{Br-}$ ion which will be attached on the central $\ce{C}$ atom. 

It also should be mentioned that a secondary reaction may happen where $\ce{H2O}$ reacts with the transition state carbocation. As a result, the molecule $\ce{CH3-CHOH-CH2Br}$ is produced.