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. During 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 coast 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, sometimes the temperature at night can approach freezing (0 °C or 32 °F). Besides, waves of bad weather can occur in winter, with wind and rain, so the sun is not always guaranteed.
On the contrary, in summer the sun almost always shines, but even May is a very sunny month.
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 south of the mountains. The Meltemi, together with the lighter breezes which in any case blow on summer afternoons, has the merit of making the heat more bearable.
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 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

For a beach holiday, the best time in Crete is from June to mid-September; as mentioned, in October the sea temperature is still acceptable, 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 for excursions on the island, spring and autumn are preferable in order 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 in the mountains it can still be cold.
In summer, you can go hiking in the mountains to find a bit of cool weather, provided you're equipped against the relentless sun.