Map from Google - Vietnam

In Vietnam the climate is tropical in the north, and subtropical in the south-central, and is influenced by the monsoons: the south-west monsoon from May to October, and the northeast monsoon from November to April. The former brings heavy rains in exposed areas, therefore the north and the south, while along the central strip, protected by the mountains, it brings relatively little rains 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) in the centre-south, and light but frequent rains in the north.
In inland areas, there are the hills and mountains that 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 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.
The north

Climate of northern Vietnam
In the north of Vietnam, during 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: in Hanoi the average is 16.5 °C, in Vinh it's 18 °C, and around 13/14 °C in the northernmost areas of Tonkin, where at night the temperature can approach freezing between December and February.
Here are the average temperatures in the capital Hanoi.
Average temperatures - Hanoi
Min (°C)141518212426262625221915
Max (°C)192023273233333231292522

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 does not invite you to bathe.
Sea temperature - Haiphong
Sea (°C)222122242729303029282623

In the mountainous areas, the winter is quite cold at 1,500 metres of altitude: the average January temperature is around 8 °C. The highest peak is Fansipan (or Phan Xi Pang), 3,143 metres high, which is covered with snow in winter.
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.
In spring, in northern Vietnam the temperature gradually rises, and the sun comes out every so often in April, but from May to October the rainy season arrives, 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 of rain per month. The maximum temperatures are around 32/33 °C, but the humidity makes the heat annoying, and sometimes it can even reach 37/38 °C, with peaks of 39/40 °C 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 winter in December.
Here is the average precipitation in Hanoi.
Average precipitation - Hanoi
Prec. (mm)2025459019024029032026513045251675

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).

The Centre

Climate of central Vietnam
Along the coast of central Vietnam, the weather gets warmer during winter: the average January temperature ranges from 20 °C in Hue, to 24 °C in Nha Trang.
Here are the average temperatures in Da Nang.
Average temperatures - Da Nang
Da NangJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)192022232526252624232219
Max (°C)252629313334343432302725

Besides, in the central part the summer monsoon has little effects, so that less than 100 mm 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.
Here is the average precipitation.
Average precipitation - Da Nang
Da NangJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)953520256585851053506153652002045

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

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. From May to August, the air is hot and humid, but if it weren't for the risk of typhoons, the climate would be quite acceptable, because it's much less rainy than the rest of Vietnam.

Inland areas

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

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

The south

Climate of southern Vietnam
In the southern part of the country, the climate is hot all year round. Between November and mid-February, the maximum temperatures are around 30/32 °C, then by mid-February the temperatures starts to rise, so that between March and May they reach the highest level of the year: 33/35 °C on average, but with peaks of 40 °C, 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

In Ho Chi Minh the rains are abundant from May to mid-November, with a maximum in September, and throughout the year, about 2,000 mm of rain fall.
Here is the average precipitation.
Average precipitation - Ho Chi Minh
Ho Chi MinhJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)1551050220310295270325265115501930

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

In southern Vietnam, the best time is from December to mid-February; March and April are still dry months, but they are uncomfortably hot.

Ha long Bay

Vietnam is located in the path of typhoons and tropical storms, which affect the country from the east between May and November, but especially between mid-July and November. Vietnam 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. Sometimes they may hit the country later, in the first half of December, as happened with Hagupit which passed around 10 December 2014, although in this period they usually arrive a bit weakened.

When to go

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. Even March and April are not bad, because in the north they are acceptable although 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 south-central, but not in the north.
For each particular area, please refer to the details above.

What to pack

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 the 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 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.
To enter pagodas, it is customary to take off shoes, dress neatly and cover a little.