Vietnamese is a diversity of 54 ethnics with many family names. The surname name "Nguyễn": is believesd to have originated in the Chinese surname "Ruan" (in Mandarin language) or "Yuen" (Cantonese) owing to China's long domination over Vietnam. During both periods of Chinese rule and Vietnamese dynasty power in Vietnam, the name "Nguyễn" was forced upon the public (sometimes by threat of violence and even pain of death) by the new regimes or for various historical reasons.
According to many sources that I read, there are some following reasons:
1. When the king "Nguyễn Hoàng" expanded our country to the South, those who followed him could change their surname into "Nguyễn".
2. After Nguyễn family founded their dynasty in Huế, they gave the name "Nguyễn" to the officials. The children of those officials, therefore, took "Nguyễn" as their surname for the purpose of honoring the King. Thus, "Nguyễn" is royal surname.
3. In some points of our ancient history, people changed their surname into "Nguyễn" in order to be safe. For example, after the conflict between "Trịnh" dynasty and "Nguyễn" dynasty, the offspring of Trịnh had to take "Nguyễn" as their surname to avoid the revenge from Nguyễn.