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 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 can cause floods. However, some short thunderstorms can occur throughout the year.
Here is the average precipitation in Zanzibar.
Zanzibar - Average precipitation

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 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 6 degrees south latitude, Pemba 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 currents, however, it can not be excluded that a Southern Hemisphere cyclone may pass over the ocean to the east, and close enough to cause storm surges. This can happen from November to mid-May, but especially from late December to mid-April. However, the chronicles of the time say that on April 15, 1872, the archipelago was fully hit 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, 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, sunscreen. When going to the reef, you can bring snorkeling equipment, including water shoes or rubber-soled shoes.