The general consensus in the athlete population, and between trainers as well, is that the cause is unknown. However, in med-school I was told that it is, at least in the medical community, known. And in my pathology book, which was in Serbian though (but translated from an American one; I don't remember which one).
The idea is that classical side stitch (that which affects the right side) occurs due to stretching of the liver capsule (fibrous covering), which is highly innervated by pain receptors. When exercising, a larger volume of blood has to be transported at every given instant. A large portion of that blood gets directed back to the heart via the liver (entering via the large portal vein, and exiting via smaller hepatic veins).
When there is a larger volume of blood coming into the liver, which has to be drained into the heart, there are two factors which counteract that: the fixed and narrow lumen of the hepatic veins, and the output of the heart.
We cant do much about the width of the hepatic veins. The heart is, in this respect, much more interesting.
In order to remove the blood that is pooling within the liver, so as to relieve the tension on the capsule, the heart must have a higher output than input. If the output is not higher than the input, then there is an increase in pressure in the venous system.
This can be seen in cardiac patients, which have a higher proportion of liver cirrhosis and varicose veins. And I can only assume, side stitches from minor activity (unless the receptors have become desensitized from prolonged stimulation).
One simple thing you can do is to exhale when you step on your left foot. When stepping on your right foot, there is a higher tension in the ligaments (which are part of the capsule) than when you step on the left foot. Also, exhaling brings the diaphragm up and away from the liver, and this puts increased tension on the ligaments and capsule. Exhaling when stepping on your left foot thus decreases the tension on the capsule.
Another, less comfortable thing, is to put your hand below the rib cage on your right side, and press upwards. This increases the pressure on the liver and thus forces more blood into the heart and out into circulation, relieving the tension on the capsule.
The idea that stretching of the capsule causes the side stitch explains why it occurs when you start running quickly without having warmed up or increase the tempo during longer runs too steeply: it increases the circulation, without an accompanying increase in adrenaline to stimulate the heart. It also explains why it can help to bend forward, and why extending your back hurts more: extension stretches the capsule.
Some people mention getting side stitches if they eat right before exercising. This can be due to distension of the stomach on the left side. However, if the pain is localized on the right side, then that can, indirectly, be because eating increases parasympathetic stimulation (it counteracts the effect of adrenaline), but also, directly, because of an increase in blood flow to the digestive organs (including the stomach) which all drain into the liver, thus, again, increasing the pressure on the capsule.