The weather in Zanzibar largely depends on location. The Island is surrounded by the sea, and the wind and heat make for monsoon rains. The wet (or rainy) season in Zanzibar has two periods—the long and short rains.
From March till May (sometimes to June) is the long rain monsoon season. It's better to avoid Zanzibar during this period as the rains can last for days, though the sun may come out for a few hours at a time. As for the prices for accommodation, they are drastically cheaper!
The period of short rains called "mwaka" runs from November to December. The temperature can reach up to 30°C with high humidity during this time.
Generally, these seasons are perfect for adventurous travelers and resorts operate as usual.