Map from Google - Zanzibar

Zanzibar is an archipelago, formed by two main islands, Unguja (also called Zanzibar) and Pemba, and several smaller islands. It is a semi-autonomous region of Tanzania, a great African country just south of the equator.
The climate is tropical, hot all year round, with two rainy seasons: one more intense, known as the "long rains" season, from March to May, with the peak in April, and the other less intense, known as the "short rains" season, between mid-October and December. The total annual rainfall is about 1,600 millimetres (63 inches) in Zanzibar, and 1,900 mm (75 in) in Pemba. April and May are the wettest months, in which downpours can be really strong, and can cause floods. However, some short thunderstorms can occur throughout the year.
Here is the average precipitation in Zanzibar.
Average precipitation - Zanzibar
ZanzibarJanFebMarAprMayJunJulAugSepOctNovDecYear
ZanzibarJFMAMJJASONDY
Prec. (mm)855515038525570505050952151851645
Prec.(in)3.32.25.915.2102.82223.78.57.364.8
Days107131815788891113127

The warmest period goes from October to March, during which the maximum temperature hovers around 31/33 degrees Celsius (88/91 °F) and the humidity is high, although the breeze tempers a little the heat. In the worst moments, the temperature can reach 36/38 °C (97/100 °F). The period from May to August, in which the southeast trade winds predominate, is cooler, with highs around 29 °C (84 °F).
Here are the average temperatures in Zanzibar.
Average temperatures - Zanzibar
ZanzibarJanFebMarAprMayJunJulAugSepOctNovDec
ZanzibarJFMAMJJASOND
Min (°C)232323242322212020212223
Max (°C)323332302929292930313131
Min (°F)737373757372706868707273
Max (°F)909190868484848486888888

The amount of sunshine in Zanzibar is good enough all year round, except in the long rains season, from March to May, where cloudiness and downpours can last a little longer.

The archipelago is located near the equator (Zanzibar is 6 degrees south latitude, Pemba 5 degrees), at the limit of the area where tropical cyclones can form; in fact it is hardly ever affected by them, probably also for a matter of currents, but it can not be excluded that a Southern Hemisphere cyclone may pass close enough to cause storm surges, from November to mid-May, but especially from late December to mid-April. However, the chronicles say that on April 15, 1872, the archipelago was fully hit by a cyclone.

Beach in Zanzibar

The sea is always warm enough for swimming: the water temperature ranges from 25 °C (77 °F) in August, to 29 °C (84 °F) from December to April.
Sea temperature - Zanzibar
ZanzibarJanFebMarAprMayJunJulAugSepOctNovDec
ZanzibarJFMAMJJASOND
Sea (°C)292929292827262526262829
Sea (°F)848484848281797779798284

When to go

The best months to enjoy the sun and the sea of Zanzibar are July, August and September. In Zanzibar the rains cease or greatly decrease already in June, so in this island you can also go in June, while in the more northern island of Pemba, it still rains a bit in this month. If you want, you can also choose the months of January and February, between the two rainy seasons, though this period is hot and sultry.

What to pack

In winter (June to August): light clothes, a sweatshirt for the evening, a light scarf for the breeze, sunscreen. For the reef, equipment for snorkeling, water shoes or rubber soled shoes.
In summer (December to February): tropics-friendly, loose fitting clothing, a light sweatshirt for the evening, a light raincoat or umbrella in December, sunscreen. For the reef, equipment for snorkeling, water shoes or rubber soled shoes.