Map from Google - Djerba

In Djerba, Tunisian island in the Gulf of Gabès, the climate is desert, but tempered by the sea. The temperatures are in fact typical of the Mediterranean climate, although the proximity to the Sahara makes heat waves possible all year round, with hot dry winds, able to bring also sand and dust.
Here are the average temperatures.
Average temperatures - Djerba
DjerbaJanFebMarAprMayJunJulAugSepOctNovDec
DjerbaJFMAMJJASOND
Min (°C)9911131620222321181310
Max (°C)161820222629323330262218
Min (°F)484852556168727370645550
Max (°F)616468727984909186797264

Rainfall, around 200 millimetres (8 inches) per year, is concentrated in the autumn and winter months.
Here is the average precipitation.
Average precipitation - Djerba
DjerbaJanFebMarAprMayJunJulAugSepOctNovDecYear
DjerbaJFMAMJJASONDY
Prec. (mm)20202015710115353530199
Prec. (in)0.80.80.80.60.30000.61.41.41.27.8
Days44432101244433

Winter, from December to February, is mild, with highs around 16/18 °C, and lows around 10 °C (50 °F). Mild and sunny days are frequent even in this season, but some days can be a bit cold and windy, and sometimes at night the temperatures can approach freezing (0 °C or 32 °F). There are also some periods of bad weather, with possible rains, though generally not abundant. Sometimes the south wind blows, and in these cases the temperature can go up to about 25 °C (77 °F).

Spring is gradually warmer and less rainy. Already in March, when the south wind blows, the temperature can exceed 35 °C (95 °F). In May, the rains become rare.

Summer, from June to September, is hot and sunny. The cooler (or less hot) days, when daytime temperatures are around 30 °C (86 °F), are also the most sultry, even though the heat is tempered by the breeze; these days alternate with hotter but also drier days, in which a bit of wind from the desert brings a more intense heat, with highs around 34/35 °C (93/95 °F). On the other hand, when the south wind blows more intensely, the temperature can reach or exceed 40 °C (104 °F); in the worst moments it can touch 45 °C (113 °F). In these cases, outdoor activities, and even sunbathing, can be difficult.

Autumn is short, and lasts a couple of months, ie October and November, during which the first disturbances occur, with the first rains, while the south wind can cause the latest hot days.

The amount of sunshine in Djerba is never scarce, because there are many sunny days even in winter. However, the sunniest season is summer, when clear skies prevail, although sometimes there may be a bit of haze or high clouds, in the periods when the south wind blows.

Djerba, coast

The sea is warm enough for swimming from July to October, when it equals or exceeds 25 °C (77 °F). In June, it is still a bit cool, but overall acceptable.
Here are the average sea temperatures.
Sea temperature - Djerba
DjerbaJanFebMarAprMayJunJulAugSepOctNovDec
DjerbaJFMAMJJASOND
Sea (°C)161516171922262827252218
Sea (°F)615961636672798281777264

When to go

The best time to visit Djerba and enjoy the sun and the sea is the summer, from June to September. In May the temperature is warm enough, especially in the second half of the month, but the sea is still cool. As mentioned, in October the sea is still warm, and there are still many warm and sunny days, but the first depressions, which bring the first rains more to the north, can bring some cloudiness and a bit of wind; however, generally you can still go in the first half of the month.