The best time to visit Shah Alam is between March and October, when rainfall is lower and outdoor sightseeing is most comfortable. Shah Alam sits in the rain shadow of the Titiwangsa Range, so it escapes the worst of the east-coast monsoon, but it does receive two rainy seasons typical of the Klang Valley.
March to May is warm and largely dry — ideal for exploring the Lake Gardens and the Blue Mosque grounds. June to August is peak-dry season, with lower humidity and pleasant evenings; this is when most international visitors pass through. September and October bring slightly more afternoon showers but also MotoGP at Sepang — book well ahead if you're travelling for the race.
November and December are wetter, with the north-east monsoon delivering regular afternoon thunderstorms. The city is still very functional and indoor attractions like i-City and the state museum make these months perfectly workable — you'll just need to be flexible with timing. Ramadan (dates shift annually) is a fascinating time to visit for Malay culture and iftar food, though some daytime eateries keep reduced hours.