Sri Lanka is a tropical island where temperatures vary between 25°C and 35°C all year round. Nevertheless, if you're planning to spend a few days at a high altitude like in Nuwara Eliya or to ascend Adam's Peak, remember that it will be much colder than in the plains! Don't forget to bring warm clothing.
Sri Lanka has two separate monsoons, one in the southwest between May and August and one in the northeast between October and January. However you can visit Sri Lanka any time of the year, there will always be somewhere with lovely weather on the island!
If you can, go to Sri Lanka between December and March when you can make the most of the whole island. If you want to spend a few days relaxing on a southern beach, it's the best time: you benefit from good visibility for scuba diving and the weather is particularly sunny. The highlands in the country's interior also have fairly clear weather, even if rain cannot be excluded.
If you wish to visit the eastern coast more specifically, May to September is the ideal time.