Central Vietnam’s coastal areas, which includes Hoi An, Da Nang and Hue, benefit from the protection of the Truong Son mountain range. This region escapes a lot of the rains from the southwest monsoon between April and September thanks to these mountains, which means you can expect sunny days during these months.
Unfortunately, the mountains don't protect these destinations from the northeast monsoon, which falls between September and December, coupled with typhoons from the Western Pacific. Flooding has been known in certain areas such as Hoi An during these months.
The best time to visit central Vietnam and its lovely beaches is between April and August when you can expect sunshine and blue skies with pleasantly hot temperatures. Around Dalat and the highlands rainfall starts to increase around June, so April and March are the ideal months for trekking in this particular area.