Mirissa’s peak season is between December and March as this is generally the driest time of year in the southern province of Sri Lanka. As the main thing to do in the town itself is enjoy the beach, your options are going to be limited on rainy days.
For that reason, you’re definitely best of visiting during this time of year if you can. In particular, January, February and March are the driest months.
April and May tend to be the hottest months, but the increase in temperature leads to more rainfall. Outside of January-March, the months with the least rainfall are July and August. Even if you visit at this time though, the weather can be quite unpredictable in both Mirissa and Sri Lanka as the country has 2 different monsoon seasons.