One reason for the French exit in 1954 was the Battle of Dien Bien Phu in spring 1954. This is because the battle highlighted how weak colonial French control had become; it was a Viet Minh victory, mostly due to their large peasant support base. The French defeat resulted in the Geneva Accords, which detailed French withdrawal from Vietnam.
Another reason for the French exit in 1954 was the popularity of the Viet Minh leaders, Ho Chi Minh and General Giap, the leader of Ho's militia. Ho's humble background appealed to the peasantry, and Giap's strict rules of conduct made his polite officers seem much more professional - this allowed the Viet Minh to win military victories and support. In comparison, the French leader Bao Dai was wildly unpopular, and so raised no support for the French regime, eventually leading to their defeat and exit in 1954.