Djerba, where it's located

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

Rainfall is very poor, around 200 millimeters (8 inches) per year, and it's concentrated in the autumn and winter months.
Here is the average precipitation.
Djerba - Average precipitation

On average, the amount of sunshine in Djerba is never scarce, in fact there are many sunny days even in winter. However, the sunniest season is summer, when clear skies prevail, although sometimes there may be a hazy sky or high clouds, in the periods when the south wind blows.
Djerba - Sunshine

Winter, from December to February, is mild, with highs around 16/18 °C (61/64 °F) and lows around 10 °C (50 °F). Mild and sunny days are frequent also in this season, but some days can be a bit cold and windy, and sometimes at night the temperature can approach freezing (0 °C or 32 °F). There are also some periods of bad weather, with possible rain, 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). By May, the rains become rare.

Summer, from June to September, is hot and sunny. The coolest (or least 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 hot and sultry days alternate with hotter but also drier days when a bit of wind from the desert brings higher temperatures, 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 reach 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 in October and November, during which the first disturbances occur, with the first rains, while the south wind can bring the last hot days.

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.
Djerba - Sea temperature
Temp (°C)161516171922262827252218
Temp (°F)615961636672798281777264

Best Time

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 in the north of the country, can bring some cloudiness and a bit of wind. However, generally you can still go in the first half of the month.