The dry season runs from May to October — the right time for diving, sailing and any kind of overland travel in northern Mozambique. Temperatures sit in the high 20s and humidity is bearable.
From November the rains start, and from January to March the coast can be hit by tropical cyclones — accommodation closes, the sea churns up, and inland roads turn into mud. Avoid that window unless you have a strong reason to be here.
A note on safety: the wider Cabo Delgado province has been affected by an insurgency since 2017. The situation in Pemba itself has remained relatively calm, but check current advisories before travelling further north into the province.