Map from Google - Vietnam

In Vietnam the climate is tropical in the north, and subtropical in the centre and south, and is influenced by the monsoons: the south-west monsoon affects the country from May to October, and the northeast monsoon from October to April. The former brings heavy rains in exposed areas, therefore the north and the south, while along the central part, protected by the mountains, it brings relatively little rain and leaves often space to the sun. The north-east monsoon is generally drier, but it brings heavy rains in the early months (October-December) along the coast exposed to the east, and light but frequent rains in the north.
In inland areas, there are hills and mountains, which make the climate milder in the summer months, but even cold in winter in the north.
The rainfall amount is normally between 1,500 and 2,500 millimetres (60 and 98 inches) per year, while there's a relatively small arid zone in the Phan Thiet area (north-east of Ho Chi Minh City), where it's slightly above 1,000 mm (40 in).

Climate of northern Vietnam
In the north of Vietnam, in winter the climate is unusually cool for the latitude: we are just south of the Tropic of Cancer, yet the average temperature in January is below 20 °C (68 °F): in Hanoi the average is 17.5 °C (63.5 °F), in Vinh it's 19 °C (64 °F), while it drops to around 14 °C (57 °F) in the northernmost areas of Tonkin, where at night the temperature can approach freezing (0 °C or 32 °F) between December and February (and sometimes in early March).
Here are the average temperatures of Cao Bang, located in the north-east, a short distance from the border with China.
Average temperatures - Cao Bang
Cao BangJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)101216202024242322191511
Max (°C)181923283132323231282421
Min (°F)505461686875757372665952
Max (°F)646673828890909088827570

The capital Hanoi is a little further to the south and about 90 km (55 mi) from the sea. Winter averages are a little higher, however, even here sometimes there can be very cool periods, with lows around 7/8 °C (45/46 °F), and highs around 15 °C (59 °F); more rarely, for a few days it can even be cold, with highs around 10 °C (50 °F). Here are the average temperatures.
Average temperatures - Hanoi
Min (°C)151619222527272626232016
Max (°C)202123283233333332292622
Min (°F)596166727781817979736861
Max (°F)687073829091919190847972

Although the winter monsoon is originally dry, because it comes from the Asian continent, the clash with the mild and moist air of the Gulf of Tonkin generates a compact cloudiness, and light but frequent rains. Therefore, during winter there is little sunshine in Hanoi, and although the temperature in itself would be spring-like, a stay is not so pleasant. Here are the sunshine hours per day in Hanoi: as you can see, it is a dull city, because even in summer the sun does not shine very often, due to the summer monsoon. There are about 1,450 hours of sunshine per year.
Sunshine - Hanoi
Sun (hours)221355655544

In spring, in northern Vietnam the temperature gradually rises, and the sun comes out every so often in April, but then from May to October it's the rainy season, and the weather becomes hot and humid, with downpours in the afternoon or evening. In Hanoi, the wettest months are July and August, with about 300 mm (12 in) of rain per month. The maximum temperature is around 33 °C (91 °F), but the humidity makes the heat annoying, and sometimes it can even reach 37/38 °C (99/100 °F), with peaks of 39/40 °C (102/104 °F) in May and June.
In October and November, when the monsoon withdraws, there is another period which is quite pleasant, before the return of the cool and dull weather in December.
Here is the average precipitation in Hanoi.
Average precipitation - Hanoi
Prec. (mm)2025459019024029032026513045251675

In mountainous areas, the winter is quite cold: at 1,500 metres (5,000 feet) of altitude, the average temperature in January is around 8 °C (46.5 °F). The highest peak is Fansipan (or Phan Xi Pang), 3,143 metres (10,311 feet) high, which is covered with snow in winter.
Here are the average temperatures of Sa Pa, located at 1,500 metres (5,000 feet), in the Hoàng Liên National Park, and at the base of the Fansipan. On the top of Fansipan the temperature is about 10 degrees Celsius (19 degrees Fahrenheit) less than at Sa Pa.
Average temperatures - Sa Pa
Sa PaJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)571113161718171613118
Max (°C)111218212323232322191714
Min (°F)414552556163646361555246
Max (°F)525464707373737372666357

In the northernmost part of the coast, near Hanoi, the sea is a bit cool from January to March, while it is very warm in the summer months. Anyway, in winter the cool and cloudy weather conditions which prevail in this season are not usually the best for swimming.
Sea temperature - Haiphong
Sea (°C)222122242729303029282623
Sea (°F)727072758184868684827973

So the best time to visit North Vietnam and the capital Hanoi is spring, and in particular the month of April, along with autumn, between October and November, which, however, still presents the risk of typhoons (see below).

Climate of central Vietnam

Along the coast of central Vietnam, the winter is warmer: the average temperature in January ranges from 20 °C (68 °F) in Hue, to 24 °C (75 °F) in Nha Trang.
Here are the average temperatures in Da Nang.
Average temperatures - Da Nang
Da NangJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)192022232526252624232219
Max (°C)252629313334343432302725
Min (°F)666872737779777975737266
Max (°F)777984889193939390868177

Besides, in the central part the summer monsoon has little effects, so that less than 100 mm (4 in) of rain per month fall until August, and the amount of sunshine remains acceptable. Here the rainy season is late, and runs from September to December, but also in January in the northern part (from Ha Tinh to Da Nang), with a maximum in October and November, when the rains can be torrential. These intense rains at the end of the year are due to the retreating monsoon, which particularly affects the part of the coast exposed to the north-east: in Hue, 500 mm (20 in) of rain fall in September, 900 mm (35 in) in October, 680 mm (26.5 in) in November, 350 mm (14 in) in December, and still 145 mm (5.5 in) in January.
In Da Nang, the situation is slightly better, but the rains are still abundant from September to December. Here is the average precipitation in Da Nang.
Average precipitation - Da Nang
Da NangJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)953520256585851053506153652002045

In Da Nang the sun shines more often than in Hanoi, both in winter (even though it does not go beyond 4/5 hours per day), and in summer, when it shines for a good number of hours (especially from May to July).
Sunshine - Da Nang
Da NangJanFebMarAprMayJunJulAugSepOctNovDec
Sun (hours)456788876554

In the central part of Vietnam, the sea is warm enough for swimming all year round, although it drops to 23 °C (73 °F) in February at Hue, and to 24 °C (75 °F) from January to March at Da Nang, while it never drops below 26 °C (79 °F) at Nha Trang.
Sea temperature - Da Nang
Da NangJanFebMarAprMayJunJulAugSepOctNovDec
Sea (°C)242424262829303029282725
Sea (°F)757575798284868684828177

Continuing south, the rainfall pattern remains more or less the same at Quang Ngai and Duc Pho, while further south precipitation drops below 2,000 mm (80 in) per year. In addition, winter temperatures gradually increase, and the likelihood of cold air coming from the north decreases.
Here are the average temperatures of Qui Nhon.
Average temperatures - Qui Nhon
Qui NhonJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)212122242525262625242320
Max (°C)252628303234343532322927
Min (°F)707072757777797977757368
Max (°F)777982869093939590908481

At Qui Nhon, 1.650 mm (65 in) of rain per year fall, and the only very rainy period goes from September to November.
Here is the average precipitation of Qui Nhon.
Average precipitation - Qui Nhon
Qui NhonJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)55404025555570552454354351401645

Continuing further south, the winter temperatures become even higher, so that in fact it is warm even in this season. Here are the average temperatures of Nha Trang.
Average temperatures - Nha Trang
Nha TrangJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)212122232424242424232222
Max (°C)282930323333333332302928
Min (°F)707072737575757575737272
Max (°F)828486909191919190868482

In this area, where the coast begins to be exposed to the south-east, precipitation drops below 1,500 mm (60 in) per year. Here is the average precipitation in Nha Trang.
Average precipitation - Nha Trang
Nha TrangJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)45203040604540551653253651801365

In Nha Trang the sun often shines for a long period, from February to August, and for a total of 2,500 hours a year.
Sunshine - Nha Trang
Nha TrangJanFebMarAprMayJunJulAugSepOctNovDec
Sun (hours)688988877655

To the south of this area, in the Binh Thuan province, the rains become even less abundant: in Phan Thiet just 1,150 mm (45 in) of rain per year fall, which are not very few, but they are concentrated in a few months, while for a long period it rains little, so the landscape becomes semi-arid, and in the Mui Ne area even sand dunes are found.

Dunes of Mui Ne

The best time to visit this area of Vietnam, runs from February to March in the northern part, and from January to March in the southern part. April is still a dry month, but it begins to be hot, even though sea breezes blow along the coast. From May to August, the air is hot and humid, but the rains are not abundant and the sun often shines, so the situation is better than in the rest of Vietnam.

Vietnam, climate of inland areas
In the interior of central Vietnam, the presence of mountains makes the climate milder, in fact there are many cities located between 400 and 1,000 metres (1,300 and 3,300 feet) above sea level, which have nice and sunny winters, while summers are a bit less sultry than in the plains.
Here are the average temperatures of Pleiku, located at 750 metres (2,450 ft) above sea level.
Average temperatures - Pleiku
Min (°C)151719202120212020191816
Max (°C)242527292929282928272524
Min (°F)596366687068706868666461
Max (°F)757781848484828482817775

Here the monsoon rains occur in the canonical period, from May to November, with a maximum between August and October. Winter is dry, therefore you can visit this area from December to March, or even April at higher altitudes, where the heat is less intense.
Here is the average precipitation.
Average precipitation - Pleiku
Prec. (mm)35253565145180200235290330240901870

Climate of southern Vietnam
In the southern part of the country, and in the southern islands (Con Dao, Phu Quoc), the climate is hot all year round, while the rainy period returns to be, as in the north, the summer. Between November and mid-February, the maximum temperatures are around 30/32 °C (86/90 °F), then in mid-February the temperatures starts to rise, so that between March and May they reach the highest level of the year: 33/35 °C (91/95 °F) on average, but with peaks of 40 °C (104 °F), before the arrival of the monsoon. During the period of the summer monsoon, the heat is quite muggy.
Here are the average temperatures of Ho Chi Minh City, near the Mekong Delta.
Average temperatures - Ho Chi Minh
Ho Chi MinhJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)212324262525242424242321
Max (°C)323334353432323231313131
Min (°F)707375797777757575757370
Max (°F)909193959390909088888888

In Ho Chi Minh the rains are abundant from May to mid-November, with a maximum in September, and they amount to about 1,900 mm (76 in) per year. Here is the average precipitation.
Average precipitation - Ho Chi Minh
Ho Chi MinhJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)1551050220310295270325265115501930

In Ho Chi Minh the amount of sunshine is good in the dry period, from December to April.
Sunshine - Ho Chi Minh
Ho Chi MinhJanFebMarAprMayJunJulAugSepOctNovDec
Sun (hours)899866665677

In southern Vietnam, the sea is warm all year round.
Sea temperature - Vinh Loi
Vinh LoiJanFebMarAprMayJunJulAugSepOctNovDec
Sea (°C)272828303030292929292828
Sea (°F)818282868686848484848282

In southern Vietnam, the best time is from December to mid-February; March and April are still dry months, but they are uncomfortably hot; however, sea breezes blow along the coasts and in the islands.

Ha long Bay

Vietnam is located in the path of typhoons, the tropical cyclones of the western Pacific, which affect the country from the east, generally from May 20 to December 10. Vietnam, especially in the northern part, is one of the most affected countries of Southeast Asia, because cyclones hit directly the coast from the sea, when they are at their maximum strength.
The area more often affected is the northern one, in particular the Gulf of Tonkin and the Red River delta. The typhoon that devastated Haiphong in early October 1881 was particularly destructive. In the north, typhoons generally occur from May 20 to mid-November, with a maximum from July to October. Typically, in July and August, typhoons only affect northern Vietnam.
At the center they generally occur from the beginning of September to December 10, although in recent times, perhaps due to global warming, we had Tropical Storm Chanthu in the central part of the country in June 2004, and Tropical Storm Sonca in the north-central in July 2017.
In the south they generally occur from October 15 to December 20, with a maximum in early November.
In January, and again from March to mid-May, occasionally some tropical depressions can form, generally off the central-southern coast, which however almost never manage to reach the coast, but are dissipated on the sea; however, they can cause abnormal waves.

The best time to visit Vietnam as a whole is the first half of February, because it's the only one which is neither very rainy nor very hot throughout the country, even though the north is cloudy and sometimes very cool. March and April are not bad as well, because in the north they are acceptable though not very sunny, while they are dry and sunny in the centre-south, but they are also hot in the south. December and January are dry and sunny in the centre and south, but not in the north.
If you want to go in July and August, you can choose the south-central coast (from Da Nang and the Cham islands to Phan Thiet, including Nha Trang), because as we have seen it is sunny and not very rainy, and generally in this period it is also spared by typhoons.

In winter: in the north (Hanoi), spring/autumn clothes, a jacket and a sweater, raincoat for the drizzle, hat and gloves for colder nights. In mountain peaks, warm clothes, down jacket, gloves, hat, hiking shoes.
In the centre (Hue, Nha Trang), light clothes for the day, sweatshirt and scarf for the breeze, jacket and sweater for cooler evenings, raincoat or umbrella until January inclusive.
For the inland south-central areas, light clothes for the day, a jacket and a sweater for the evening.
For the south (Ho Chi Minh), light clothing, a scarf for the breeze, a light sweatshirt for the evening, possibly a light jacket or sweater for cooler evenings.
In summer: across the country, at low altitude, tropics-friendly, lightweight clothing of natural fibres, light raincoat or umbrella, a light sweatshirt for the evening; for hill altitude towns, you can add a sweatshirt and a light jacket; for the highest peaks, warm clothes, fleece, jacket, raincoat, hiking boots.
For the reef, equipment for snorkeling, water shoes or rubber soled shoes.
Before entering pagodas, it is customary to take off shoes, dress neatly and cover a little.