Map from Google - Athens

In Athens, capital of Greece, the climate is Mediterranean, with mild and moderately rainy winters, and hot, sunny summers. The city is located near the 38th parallel, but in winter, from December to mid-March, it's sometimes subject to outbreaks of cold air from the Balkan Peninsula, which can bring cold and rain for some days, and sometimes even snow. Snowfalls occur more easily in the north of the city; at the centre, the Acropolis is whitened by snow more easily than then lower surrounding areas; a particularly abundant snowfall, which affected also the southern and coastal areas, occurred in February 2008.
Summer is hot and sunny; in summer Athens is the hottest capital of Europe; in July and August the temperature reaches quite easily 35/36 °C, but sometimes even 40 °C.
Precipitation is not abundant, since it amounts to about 400 millimetres per year, and follows a Mediterranean pattern, with a maximum from November to February, and a minimum in summer, when clear skies prevail and there are occasional thunderstorms.
Here is the average precipitation in the Ellinikon Airport.
Average precipitation - Ellinikon
EllinikonJanFebMarAprMayJunJulAugSepOctNovDecYear
EllinikonJFMAMJJASONDY
Prec. (mm)504040251565710505565368
Days978641113581164

The city covers a wide area in the plain of Attica, and is surrounded by mountains on three sides, and open to the sea to the south. Thus, there are slight differences that are worth considering, looking at data of four stations, from north to south.

Athens, weather stations position

Let's start from the Tatoi Airport, located in Decelea, at 240 metres above sea level, on the northern outskirts of the city, close to the foothills of the Parnitha mountain range. Here the average temperature of January is 7.5 °C, that of July is 25.7 °C; precipitation amounts to 450 mm per year, with a maximum of 85 mm in December and a minimum of 6 mm in August. Here are the average temperatures.
Average temperatures - Tatoi Airport
Tatoi AirportJanFebMarAprMayJunJulAugSepOctNovDec
Tatoi AirportJFMAMJJASOND
Min (°C)345812161919161285
Max (°C)121315192530323228231713

Further south, near the park of Nea Filadelfia, in the north-central part of the city, 6 km from the centre and 135 metres above sea level, the average temperature ranges from 9 °C in January, to 27 °C in July. Here rainfall is just scarcer, 415 mm per year, being a bit lower in winter.
Average temperatures - Nea Filadelfia
Nea FiladelfiaJanFebMarAprMayJunJulAugSepOctNovDec
Nea FiladelfiaJFMAMJJASOND
Min (°C)55710141821211713107
Max (°C)131416202631343329231814

In the National Observatory, at the city centre and not far away from the Acropolis, 100 metres above sea level, the temperature is higher, almost 10 °C in January and 28 °C in July, and is affected by the urban heat island. Here the rainfall amounts to 375 millimetres per year, so it's even lower, and it does not go above the 67 mm of December.
Average temperatures - Athens
AthensJanFebMarAprMayJunJulAugSepOctNovDec
AthensJFMAMJJASOND
Min (°C)77812162023231915118
Max (°C)131416212631333329241814

Going further south, we arrive in the old Ellinikon Airport, located on the coast, in the extreme southern edge of the city. The temperature ranges from 10.3 °C in January, to 27.3 °C in July and August. Rainfall is very similar to that of the centre, and as we have seen it amounts to 365 mm per year.
Average temperatures - Ellinikon
EllinikonJanFebMarAprMayJunJulAugSepOctNovDec
EllinikonJFMAMJJASOND
Min (°C)77811162023232016129
Max (°C)141416192429323228231915

The amount of sunshine in Athens is great in summer, when clear skies prevail, while it's not so high from November to February, when the sky is often cloudy, although there may be sunny days also in midwinter.
The sea in Athens is warm enough for swimming from July to September, when the temperature is 24 °C; in June it's still a bit cool, about 21 °C.
Here are the average sea temperatures.
Sea temperature - Athens
AthensJanFebMarAprMayJunJulAugSepOctNovDec
AthensJFMAMJJASOND
Sea (°C)161515161821242424211917

When to go

The best times to visit Athens are spring and autumn, especially from mid-April to late May, and from mid-September to early October; from mid-October the likelihood of rainfall increases, which sometimes can be violent and concentrated in time. Those who don't suffer from the heat, can also choose the summer.