brutally copy-pasted from this website, to which all rights belong
What happens on bikes when we brake? To make a simple model, consider a bike that contacts the ground in two places and has a center of mass. The bike is gray, the ground is black, and the forces on the bike are red. The front is to the left; the bicycle is moving left.
As the bike goes along, the normal forces on the wheels counter the force of gravity on the center of mass. We’ve drawn the center of mass equidistant from the supports, so to make the net torque zero, the two normal forces are equal. What happens when we brake using the front wheel?
We’ve added in the horizontal braking force slowing the bike down. There is now a torque about the center of mass. This torque acts to rotate the bicycle up.
However, as long as the braking force is fairly small, we don’t actually lift the bicycle up off the ground. Instead, it will rise a very small distance. As it rises, the normal forces re-adjust to cancel the torque about the center of mass, like this:
There is no longer torque about the center of mass, so the bike no longer rotates. It has gained some very small gravitational potential energy, but too slight to notice. However, the weight on the front wheel is now much greater. Since there is more weight on that wheel, we can apply even more braking force if we want. The braking force is limited by a constant coefficient of friction times the normal force, so a bigger normal force allows a bigger braking force.
If we brake with the back wheel, the braking forces causes precisely the same torque about the center of mass. The normal force on the front wheel will still increase and the normal force on the rear wheel will still decrease. That means we can’t brake as well because we’re using the wheel with less weight on it. We can’t flip over because as the bike starts to rise (and it will, even using the back brake), the braking force gets weaker and weaker and ceases to provide enough torque to continue rotating the bike.
The condition for the bike to stay on the ground is that the torque from the braking force (about the center of mass) needs to be less than that of the maximum normal force on the front wheel. This gives:
( Fb / m ) < ( g * d / h )
where Fb is the braking force, m the mass, g gravitational acceleration, d the horizontal distance from the front wheel to the center of mass, and h the height of the center of mass. This puts a limiting acceleration on the bicycle while braking. To be able to brake harder, get lower and further back.