Previously answered here. Here's what /u/sunxiaohu said:
Vietnamese was formerly written with Hanzi, or Chinese Characters. Unfortunately, it didn't suit the spoken language particularly well, in part because Vietnamese is an Austroasiatic language while Chinese it Tibeto-Burman. This meant that it was hard to spread literacy amongst the middle class because learning to read and write required learning Classical Chinese first.
Other languages that were in the same situations, such as Korean and Japanese, developed alternative writing systems to better express their language in writing. Korean scholars developed hangul in the 15th century, for example. Korean society experienced increasing literacy rates until the Imjin Wars of 1592-1597, after which literacy levels dropped precipitously, and did not begin to rise again until 1905.
Vietnamese went the other way, initially. In the 13th century, Chinese-style characters that didn't already exist in Chinese were developed solely for Vietnamese words. These are called chu nom and they are actually quite interesting. Vietnamese poetry experienced a golden age once these new characters were well developed, and a great deal of Vietnamese literary culture up to the present day owes a debt of gratitude to chu nom and their early adopters.
The problem was that you still had to learn Chinese first if you wanted to become literate. So the average person lived their life in a state of illiteracy or semi-literacy for most of recorded Vietnamese history. When the Jesuits came to Vietnam in the 17th century, they set about trying to educate young Vietnamese people. This is a controversial topic, and I want to emphasize that I am not making a judgement on anyone or any institution before I proceed. In an effort to ease pedagogy, the Catholics developed quoc ngu, a romanization of Vietnamese. When the French conquered Vietnam, quoc ngu systematically replaced Chu Nom as the written language for everybody.