Map from Google - Malaysia

In Malaysia the climate is equatorial, ie hot, humid and rainy throughout the year. The temperatures are high and stable, with a slight decrease between November and January, when the maximum goes down to 29/30 °C (84/86 °F), at least in the north, and a slight increase (which, however, is felt because of the high humidity) between March and August, when the maximum stays around 32/33 °C (90/91 °F) and the minimum around 23/25 °C (73/77 °F). Even the rains are abundant and continuous throughout the year: it is difficult to find an area where the rainfall is lower than 2,000 millimetres (79 inches) per year, or a month in which it is lower than 100 mm (4 in), however it is possible to find periods in which rainfall is not too high, although they are not the same everywhere.
The rains are determined by the monsoon regime, however, being Malaysia near the Equator and being surrounded by the sea, there is no real dry season. In addition, the rains, as is generally the case in tropical countries, are quite erratic from year to year.
Anyway, rainfall is more abundant and frequent in the areas directly exposed to the prevailing winds: between mid-October and January the northeast monsoon prevails, primarily affecting the east coast of Peninsular Malaysia and the north-east coast of Borneo, while between June and September there's the southwest monsoon, which in Malaysia usually produces weaker effects.
It should, however, be noted that the tropical rains occur mainly in the form of intense downpour or thunderstorm, usually in the afternoon, so there's no shortage of sunshine, at least in the morning when the weather conditions are generally good.

1- Peninsular Malaysia

Peninsular Malaysia, east coast
Along the east coast of Peninsular Malaysia, from 2,500 to 3,000 mm (98 to 118 in) of rain per year fall. The rains are abundant in November and December, when they even exceed 500 mm (20 in) per month. In general, December is the rainiest month. This unfavorable period can be prolonged until January, especially in the central and southern part, and in some year even in the norhern one. In Kota Bharu, in the far north, near the border with Thailand, November and December are clearly distinguishable as the worst months, being characterized by torrential rains. The best period is from February to April, when rainfall often drops below 100 mm (4 in) per month (but not in all the years), and February is the absolute best because it is a bit less hot. Then the rains gradually increase again from May, but as mentioned, there is a substantial increase only in November. This trend also applies to the nearby Redang and Perhentian Islands, where the tourist facilities are often closed from November to January.
Here is the average precipitation in Kota Bharu.
Average precipitation - Kota Bharu
Kota BharuJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)2501401701151601501401652102106156152940

In Kota Bharu, as in the rest of Malaysia, it's hot all year round. Here are the average temperatures.
Average temperatures - Kota Bharu
Kota BharuJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)232323242424242423242323
Max (°C)293031333333323232313029
Min (°F)737373757575757573757373
Max (°F)848688919191909090888684

The sea in Malaysia is warm throughout the year, as can be seen in the following table, concerning the water temperatures in Kota Baharu.
Sea temperature - Kota Bharu
Kota BharuJanFebMarAprMayJunJulAugSepOctNovDec
Sea (°C)272828303030292929292928
Sea (°F)818282868686848484848482

Continuing south (see Kuala Terengganu), therefore closer to the Equator, the trend remains similar, but the driest period from February to April becomes less noticeable, so that there is not a substantial difference from February to July, which therefore is the best time but in which there's no shortage of rainfall, since we are always above 100 mm (4 in) per month. Similar trends is found going south, in the island of Tioman, where the rains fall more or less in the same amount from February to September, although after all the best month here is still February.

Peninsular Malaysia, west

Along the west coast of Peninsular Malaysia, overlooking the Strait of Malacca, the rains are a bit less abundant, given that they range from 1,800 to 2,500 mm (70 to 98 in) per year, and also the rainfall pattern is substantially different. Here there is not a peak between November and January, which are in fact relatively dry months, especially in the north, since in the interior there are mountains that block the north-eastern winds, which as we have seen prevail in this period. In Langkawi, less than 100 mm (4 in) fall from December to March, therefore this is the best period, but particularly January and February, which are quite dry, with about 50 mm (2 in) per month: for Malaysia it's a rare fortune.
Here is the average precipitation.
Average precipitation - Langkawi
Prec. (mm)504590170255220235250340345215952305

In this area it's hot even in the "winter" period, with highs around 32/33 °C (90/91 °F), even though the humidity is slightly lower than in the rest of the year, because the winds come from the interior. The rainiest months in Langkawi are September and October, even though the rains do not reach the peaks of the east coast: they are around 300/350 mm (12/14 in) per month, so in any case it is better to avoid them, but it rains a lot also from May to August and in November, ie from 200 to 250 mm (8/10 in) per month.
Average temperatures - Langkawi
Min (°C)242425252525252524242524
Max (°C)333333323232313131313132
Min (°F)757577777777777775757775
Max (°F)919191909090888888888890

In George Town and Penang Island, January and February are the best months, although they are not as dry as in Langkawi, being around 100 mm (4 in) per month. In December and March, precipitation is already around 150/160 mm (6/6.3 in), and even more from June to August, when it's around 200 mm (8 in) per month. Further south, in Pangkor, even in January and February, about 150 mm (6 in) of rain per month fall, so here the least rainy months are June, July and August, however, there are no major differences with January and February. Even in the capital Kuala Lumpur there is not a clearly drier period, however, the least rainy season is from June to August, followed by January and February. The thunderstorms can erupt at any moment, as racing drivers (and viewers) of the Formula 1 Malaysian Grand Prix racing well know.
Here is the average precipitation.
Average precipitation - Kuala Lumpur
Kuala LumpurJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)1701652402602051251251551952552902452425

Furthermore, in the big city the heat is more intense than elsewhere, due to the urban heat island effect.
Average temperatures - Kuala Lumpur
Kuala LumpurJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)232323242424232323232323
Max (°C)323333333333323232323232
Min (°F)737373757575737373737373
Max (°F)909191919191909090909090

Even in inland areas of Peninsular Malaysia, in cities like Temerloh and Johor Bahru, the latter located just north of Singapore, the situation is similar, since the relatively less rainy months are February, June and July, without there being a period clearly preferable.

2- Malaysian Borneo

Climate of the Malaysian Borneo

In the east, Borneo is even rainier than Peninsular Malaysia, especially in the part located west of Brunei (State of Sarawak), where precipitation exceeds 4,000 mm (157 in) per year. The westernmost part is the rainiest (see the red area) where Kuching is located, well exposed to the north-east monsoon and therefore very rainy from October to March, with more than 300 mm (12 in) per month and even 700 mm (27.5 in) in January, at a time when it rains almost every day. In the other months, it goes a bit better, but the rainfall amount doesn't go below 190/220 mm (7.5/8.5 in) per month from June to August, which however are the best months (or, honestly, the least worse).
Here is the average precipitation in Kuching.
Average precipitation - Kuching
Prec. (mm)6854753402752402201852302603403705004115

The coast of Borneo east of Kuching and up to Miri (blue area), does not experience that extreme peak of rain from December to February, because it is not directly exposed to the north-east, but otherwise the trend is similar, with heavy rains throughout the year, so it is difficult to find a better time, however in this region the best period is probably from May to July.
Here is the average precipitation in Bintulu.
Average precipitation - Bintulu
Prec. (mm)3802602652602352552402752903253754203580

East of the small country of Brunei, in the state of Sabah and up to Kudat (green area), all in all the best time runs from February to April. In Labuan, a particularly rainy island, the average rainfall drops below 150 mm (6 in) from January to March, while more to the north-east, in Kota Kinabalu precipitation drops below 100 mm (4 in) per month in February and March.
Here is the average precipitation in Kota Kinabalu.
Average precipitation - Kota Kinabalu
Kota KinabaluJanFebMarAprMayJunJulAugSepOctNovDecYear
Prec. (mm)10575501152152802652702853453002402545

On the northeasternmost coast (see Sandakan, and the Lihiman and Libaran islands), the rains return to be particularly heavy from November to February, while the least rainy months are April and May, however, with about 120 mm (4.7 in) of rain per month.
Here is the average precipitation in Sandakan.
Average precipitation - Sandakan
Prec. (mm)4003051551151251952002252252853354603015

In the south-eastern portion of Sabah, near the border with Indonesia (orange area), there is a small region which is quite sheltered, at least from the north-east monsoon: the Bay of Lahad Datu, where less than 2,000 mm (79 in) per annum fall, with a minimum of about 150 mm (6 in) per month from June to September, and the city of Tawau, near the border with the Indonesian part of Borneo.

Cyclones, mountains, El Niño

Malaysia is located just south of the latitude where tropical cyclones (called typhoons in the Pacific and cyclones in Indian Ocean) form. This means that the country can be affected, usually in a marginal way, and certainly not as much as the Philippines and the countries of south-east Asia. The cyclone and typhoon season lasts from May to November, although the peak of likelihood is in September. However, since the sea in this area is always warm, tropical storms may occur in any season, as happened with the storm Vamei that affected Peninsular Malaysia during the Christmas period of 2001.
In inland areas there are hilly areas (called highlands), which have a slightly cooler climate and are often covered by rainforests, but there are also mountains, the highest of which is Mount Kinabalu in Borneo, which exceeds 4,000 metres (13,000 ft), while in Peninsular Malaysia there are a few peaks which are slightly higher than 2,000 metres (6,500 feet). The temperature obviously decreases with increasing altitude: at 1,500 metres (5,000 feet), the daily average is around 17/18 °C (63/64 °F).
Here are the average temperatures of Tanah Rata, which is located in Cameron Highlands, in Peninsular Malaysia, at 1,470 metres (4,800 feet) above sea level.
Average temperatures - Tanah Rata
Tanah RataJanFebMarAprMayJunJulAugSepOctNovDec
Min (°C)131314151514141414141414
Max (°C)212222232322222222222121
Min (°F)555557595957575757575757
Max (°F)707272737372727272727070

Malaysia is also affected by the phenomenon known as El Niño, which brings unusually high temperatures and drought, especially in the years when it is more intense, as happened in 1998, when water had to be rationed in Kuala Lumpur. The opposite phenomenon, La Niña, brings cooler temperatures than normal and heavy rainfall.

Malaysia resorts

When to go

The best time to visit Malaysia as a whole goes from June to August: to tell the truth it's everywhere a rainy period, with more than 100 mm (4 in) per month, and sometimes more than 200 mm (8 in), but on the other hand this is the climate of Malaysia and you cannot get any better. If you intend to visit only one place, for the best times in specific areas, you can refer to the above suggestions.
As mentioned, the sea is warm all year round.

What to pack

All year round: tropics-friendly, loose fitting clothing, made of natural fibres, a scarf for the breeze, a light sweatshirt for air conditioned places, light raincoat or umbrella.
At high altitude, around 1,500 metres (5,000 feet), spring/autumn clothes, a sweatshirt and a jacket; for the high mountains, warm clothes, warm jacket, raincoat, hiking shoes.
For the reef, equipment for snorkeling, water shoes or rubber soled shoes.