Zanzibar is an archipelago formed by two main islands, Unguja (also called Zanzibar) and Pemba, plus 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. Total annual rainfall is about 1,600 millimeters (63 inches) in Zanzibar and 1,900 mm (75 in) in Pemba. April and May are the wettest months, when downpours can be really strong and cause floods. However, some short thunderstorms can occur throughout the year.
Here is the average precipitation in Zanzibar.
Zanzibar - Average precipitation

Temperatures are high throughout the year. The warmest period is 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, when the southeast trade winds predominate, is cooler, with highs around 29 °C (84 °F).
Here are the average temperatures in Zanzibar.
Zanzibar - Average temperatures
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.
Zanzibar - Sunshine

Beach in Zanzibar

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

Tropical cyclones

The archipelago is located near the Equator (Zanzibar is at 6 degrees south latitude and Pemba at 5 degrees), at the limit of the area where tropical cyclones can form. In fact, Zanzibar is hardly ever affected by cyclones, probably also because of the prevailing currents, however, it can not be excluded that a cyclone of the Southern Hemisphere may pass (over the ocean to the east) close enough to cause storm surges. This can happen from November to mid-May, but especially from late December to mid-April. However, according to the reports of that time, on April 15, 1872, the archipelago was hit at full force by a cyclone.

Best Time

The best months to enjoy the sun and the sea of Zanzibar are July, August and September. In Zanzibar, the rains cease or drastically decrease already in June, so on this island, you can also go in June, while on 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): pack light clothes, a sweatshirt for the evening, a light scarf for the breeze, and sunscreen. When going to the reef, you can bring snorkeling equipment, including water shoes or rubber-soled shoes.
In summer (December to February): pack tropics-friendly, loose-fitting clothing, a light sweatshirt for the evening, a light raincoat or umbrella in December, and sunscreen. When going to the reef, you can bring snorkeling equipment, including water shoes or rubber-soled shoes.