North Korea made the shift starting in the late 1940s. 1949, officially.
South Korea was still using them quite frequently as late as the 1990s, and you can still find plenty of examples of mixed script Korean in academic texts today. In the early 90's newspapers finally switched over to Hangeul. However Chinese characters (hanja) are still used for abbreviations and some technical terminology where they can clear up ambiguity. Officially, the teaching of hanja stopped in 1971 in South Korea for younger students. In both Koreas, hanja are still taught to high schoolers, but in limited number. It's also worth mentioning that prior to this, hangeul was only really standardised in the 1930s, and then again in the 1980s.
In Vietnam, Chinese characters (chữ nôm) were replaced in the 1920s. The system that replaced it wasn't too new. It was developed and in use by missionaries in the mid 1800s.
Why, for both languages, is a little more complicated. A big part of it had to do with national identity. A big part of it had to do with efforts to improve literacy. On those grounds even Mao Zedong made early pushes to replace Chinese characters with an alphabet, though this ultimately never happened (though it got close in some places).
Another significant factor is that at this time (early 20th century) the practice of writing all formal texts in Classical Chinese was falling out of favour across Asia. People were starting to use the vernacular to write, rather than an archaic form of another language entirely. If you're going to write the way you speak, then there's less perceived value in using an old foreign orthography to do it, especially when the list of perceived shortcomings is quite long when it comes to how that script can represent your language.
Simply put, one could say that the sort of nationalism that was developing at the start of the 20th century across the region (e.g. 五四運動) was really the key factor.