Position of Crete

Crete, the largest Greek island, has a Mediterranean climate, with mild, rainy winters and hot, sunny summers.
Here are the average temperatures of Heraklion, the largest city of the island.
Heraklion - Average temperatures
Min (°C)9910121519212219161411
Max (°C)161617202327292927242118
Min (°F)484850545966707266615752
Max (°F)616163687381848481757064

The bulk of the rain falls from October to March; in summer, it almost never rains. In winter, but also in spring, it can snow in the mountains of the island, the highest of which is Mount Ida, 2,456 meters (8,058 feet) high. Along the coasts and in the plains, rainfall amounts to around 500/600 millimeters per year; given the long summer drought, the landscape is semi-arid, especially in summer. In inland areas, there are greener slopes, where forests grow, but there is also a rocky desert in the mountain range called Lefka Ori ("White Mountains"), which is located in the western part of the island. In the interior of the island, there are also rivers, lakes and deep gorges.
Here is the average precipitation in Heraklion.
Heraklion - Average precipitation

In winter, from December to mid-March, temperatures are generally mild, although the wind can exacerbate the feeling of cold. For its southern location, Crete is less exposed to cold spells than other Greek islands, however, the temperature at night can sometimes approach freezing (0 °C or 32 °F). In addition, waves of bad weather can occur in winter, with wind and rain, so the sun in this season is not always guaranteed.
On the contrary, in summer, the sun almost always shines, but it often shines already in May.
Here are the average daily sunshine hours in Heraklion.
Heraklion - Sunshine

In the fine season, from mid-May to mid-September, the Meltemi (or Etesian) blows, an annoying wind that blows from the northwest and can make the sea rough. The southern coasts are more sheltered from this wind, especially in the coastal stretches that are located to the south of the mountains. However, the Meltemi has the merit of making the heat more bearable, together with the lighter breezes which in any case blow on summer afternoons.
During summer, heat waves from Africa can occasionally occur, with peaks of 35 °C (95 °F) on the coast and 40 °C (104 °F) in the interior. The hottest areas in these cases are the hills of the interior.

Palace of Knossos

The sea in Crete is warm enough for swimming from July to September, while it is a bit cool, but still acceptable, in June and October. Here are the average sea temperatures.
Heraklion - Sea temperature
Temp (°C)161515161922242524222018
Temp (°F)615959616672757775726864

Best Time

The best time for a beach holiday in Crete is from June to mid-September. As mentioned, the sea temperature is still acceptable in October, but the days get shorter and the first rains may occur. When it's not really hot, those who are sensitive to cold may feel a bit cool because of the wind, also in June and September, so it's better to bring a sweatshirt for safety.
If you want to visit the ruins of ancient civilizations and to go on excursions around the island, spring and autumn are preferable to avoid the summer heat, especially in April and May, and from mid-September to mid-October; spring is preferable because it is milder and nature is in bloom, although it can still be cold in the mountains.
In summer, you can go hiking in the mountains to find a bit of cool weather, provided you're equipped for the relentless sun.