The best time to visit the Comoros is during the dry season from May to October, when the southeast trade winds bring cooler temperatures, lower humidity, and less rain. June through September is the most comfortable period, with daytime temperatures around 25-27C and relatively clear skies.
The hot, wet season runs from November to April, driven by the northwest monsoon. January is the wettest month, with heavy downpours, high humidity, and temperatures climbing to 30C and above. This is also cyclone season -- storms are possible from late December through mid-April, and while direct hits on the Comoros are rare, they do happen and can disrupt travel significantly.
For diving, the window from April to November is best, with the calmest seas and clearest visibility. Humpback whales pass through Moheli's waters from July to October. Sea turtles nest on Moheli's beaches from November to March, so if that is your focus you will need to visit during the wetter months.
The sea is warm enough for swimming year-round, ranging from 25C in August to 29C in March. Even in the dry season, you should expect some rain -- this is a tropical archipelago, and showers are part of life.
There is no real tourist high season in the Comoros because there are so few tourists. You will not encounter crowds at any time of year. Plan around the weather and whatever you want to see, not around other visitors.