The title should be clear enough. To my current understanding, whether quarks form proton or neutron depends on the spin of the quarks. It would make more sense for the three quarks to result in either positive or negative charge, since there is an odd number of them. Lets say you add 1 1 -1 you get 1 or if you add 1 -1 -1 you get -1. That's a positive and negative. Why does the neutron end up, well neutral?
2 Answers
The charges of the light quarks are u:2/3 ; d:-1/3 ; and s:-1/3 , and the opposite for the respective antiquarks.
So, for mesons, consisting of a quark and an antiquark, you should be able to see their charges could be -1, or 0, or +1 , all of which are well represented in the particle data tables; e.g. $\pi^\pm, \pi^0$.
The baryons, consisting of three quarks, can likewise have charges $-1, 0, 1,2$ , as evident in the baryon decuplet, and of course, their opposites in the antibaryon decuplet.
I'm not sure what features of hadrons you need explained. Going through the PDG tables might stimulate your interest. Introductory HEP courses normally prep the student to explain most such features...
To get a charge -1$e$ particle from the up (u) and down (d) quarks you need three d quarks each having charge -1/3 $e$. This means that flavour part of the wavefunction is symmetric in the three quarks. The color part is necessarily antisymmetric so as to get the colour singlet required by confinement. As Fermi statistics requires the combined state be antisymmetric, the spin part of the state would have to be symmetric and so the total spin will be j=3/2. The resulting particle cannot be a spin 1/2 hadron, and is instead the spin 3/2 $\Delta^-$.
Similarly three u quarks gives the $\Delta^{++}$