The Cook Islands are a fantastic destination to visit at pretty much any time of year, as the tropical climate is mild all year round- although it can often rain (especially in the mountainous region of Rarotonga)- the wet season runs from December to March, and this is also the most cyclone-prone period.
The best time to visit is during the months of September and October, when there is a good balance between warm weather and humidity levels, or between March and May, when cyclone season is over and the weather is usually bright and sunny.