In addition to all the above good info, today's tubes no longer use a thick either steel or rubber reinforcement around the valve stem which is the reason for the rise of mini pumps with a hose. If you pumped up the tire before the ride it is possible that you put too much stress on the valve and then after a period of time with air pressure adding to the weak area it simply let go.
By the way I never use the presta valve lock nut that is suppose to hold the stem in the correct location on the rim, but if you have really deep rims then you may need to use it but not because the valve will move but so that you don't have to struggle to get the valve into the hole to add air when it's flat or real low on air.
Last edited by rekmeyata; 07-04-15 at 09:13 AM.