The single most useful thing to understand about Sri Lankan weather is that there is no bad time to visit — only a bad time to visit the wrong coast.
Two monsoons
The southwest monsoon (Yala) runs roughly May to September and hits the west and south coasts and the hill country. The northeast monsoon (Maha) runs October to January and hits the east and north.
December to March
Peak season. South and west coasts at their best, whale watching from Mirissa, hill country clear and cold at night. Book accommodation months ahead for the Christmas and New Year weeks.
April
The inter-monsoon sweet spot — decent weather almost everywhere, and Sinhala and Tamil New Year in mid-April brings genuine celebration.
May to September
Go east. Trincomalee, Nilaveli, Pasikuda and Arugam Bay are calm, dry and empty. Yala's leopard sightings peak as water sources shrink. The south coast is wet and the surf is big.
October and November
The awkward months — inter-monsoon rain can appear anywhere. Also the cheapest, quietest time to travel, and the rain is usually a heavy afternoon burst rather than all day.