The temperature of most places in Malaysia is usually between 23C-32C any day of the year. Because our country is almost at the equator, we don't experience much seasonal temperature changes
The best time to visit Malaysia is therefore dependent on the rainfall level. This varies quite a bit by region. For the main regions:
Kuala Lumpur: May-September is the driest months. March-April & October-November are the wettest months
Penang and Langkawi (west coast of the peninsula): December-March are the driest month. September and October are the wettest months.
East coast of the peninsula: April-September are the driest months. October-March is the monsoon season and it can get very wet. It can rain for days at a time here and some islands are closed during this time. This is also the wettest part of Malaysia due to the monsoon
Sarawak and Sabah on Borneo island: February-April are the driest months. September-November are the wettest months of the year.
One thing to note is that we get haze from Indonesia from time to time between July-October. It's hard to predict when the haze will come because it depends on wind directions, but when it does hit the pollution level can skyrocket.