Map from Google - Afghanistan

In Afghanistan the climate is usually arid continental, with cold and relatively rainy winters (and with a rainy peak in spring), and hot and sunny summers. However, there are substantial differences depending on area and altitude: the south is desert, many areas are cold because of altitude, and the far east is relatively rainy even in summer because it is partly affected by the Indian monsoon.
Precipitation is generally scarce, at semi-desert or desert levels, except in the eastern regions, where it can exceed 500 millimetres per year, while in the far east, near the border with Pakistan (Konar and Nurestan provinces) it can touch even 1.000 mm.
During winter, the centre-north of the country (and more rarely the south) is reached by disturbances of ancient Mediterranean origin, which bring a bit of rain, and even snow, most likely in the mountains. In early spring, the clashes of air masses due to the heating of the southern landmasses further increases rainfall, so that March is often the wettest month. The rains then decrease, and usually from June to September it never rains. Only in the most eastern region, east of Kabul, there is some increase in rainfall in July and August, due to the last offshoot of the monsoon affecting India and Pakistan.

In the northern plains (ancient Bactria), crossed by the Amu Darya River that marks the border with the former Soviet republics, the climate is continental, with cold winters (but the average daily temperature exceeds freezing even in January) and very hot summers. In winter, however, waves of frost are possible, with peaks of -20/-25 °C. Summer is really hot, with peaks of 45 degrees and even more, and sunny.
Here are the average temperatures of Mazar-i-Sharif, located 360 metres above sea level.
Average temperatures - Mazar-i-Sharif
Mazar-i-SharifJanFebMarAprMayJunJulAugSepOctNovDec
Mazar-i-SharifJFMAMJJASOND
Min (°C)-20511162226241793-1
Max (°C)91217243137393732251610

The rains, scarce, occur in winter and spring, with a maximum in March, when air masses clashes can cause strong winds.
Here is the average precipitation.
Average precipitation - Mazar-i-Sharif
Mazar-i-SharifJanFebMarAprMayJunJulAugSepOctNovDecYear
Mazar-i-SharifJFMAMJJASONDY
Prec. (mm)3035453010000051520185
Days45772000002330

Afghanistan is a mountainous country, and is crossed by the chain of Hindu Kush in its various ramifications, but also by Pamir in the far north-east, in the icy Wakhan Corridor, near the border with China. Many cities, starting from the capital, are located in narrow valleys, crossed by rivers, between mountains, at higher or lower elevations. In the country there are several very high peaks, among which Noshaq (7,492 metres), Shar Dhar (7,038 m) and Lunkho e Dosare (6,901 metres), all three at the border with Pakistan, and Kohe Bandaka (6,843 metres). At high altitudes, above 4,000 metres, there are vast glaciers.
Here are the average temperatures of Bamyan, situated at 2,500 metres above sea level, 125 km north-west of Kabul. As we see, winter is freezing, and although in summer the temperatures rise quite a bit, nights are still very cool, or even cold.
@temp-Bamyan
West of Bamyan, and 3,000 metres above sea level, we find the six lakes of Band-i-Amir, protected in a national park.
The capital Kabul is located at a high altitude, at 1,800 metres above sea level. Winter is cold (the average temperature in January is -1 °C), usually with freezing nights, and with possible peaks of -20/-25 °C; snowfalls are fairly frequent and sometimes heavy. Summer is hot during the day, sometimes torrid, but nights remain usually cool.
Here are the average temperatures.
Average temperatures - Kabul
KabulJanFebMarAprMayJunJulAugSepOctNovDec
KabulJFMAMJJASOND
Min (°C)-7-515912151494-1-5
Max (°C)571318243032322923158

Rainfall, fairly low, amounts to 300 millimetres per year. The rainiest season is spring. In summer it almost never rains.
Here is the average precipitation.
Average precipitation - Kabul
KabulJanFebMarAprMayJunJulAugSepOctNovDecYear
KabulJFMAMJJASONDY
Prec. (mm)3560657025162242020310
Days56884010003439

Kabul, mountains in the background

Herat is located in the west, in the Hari River Valley, at about the same latitude as Kabul, but at a lower altitude (900 metres). Winter is cold, but with average temperatures above freezing. Sometimes it can snow, but more rarely than in Kabul. Even here, in winter cold spells with heavy frosts are possible. Summer is hot and sunny, and characterized by an intense and frequent wind that blows from the north, the "wind of one hundred and twenty days" (Bad-i-Sad-u-Bist-Ruz), which blows in the west of Afghanistan in the warm season, from June to September, raising sand, dust and salt.
Here are the average temperatures.
Average temperatures - Herat
HeratJanFebMarAprMayJunJulAugSepOctNovDec
HeratJFMAMJJASOND
Min (°C)-3-149131821191371-1
Max (°C)91218243035373531251812

Rainfall is scarce, and amounts to 240 millimetres per year. It never rains from June to September, but even autumn is dry.
Here is the average precipitation.
Average precipitation - Herat
HeratJanFebMarAprMayJunJulAugSepOctNovDecYear
HeratJFMAMJJASONDY
Prec. (mm)5045553010000021035240
Days68872000013540

Herat, aerial views

In the south the climate becomes warmer, and winter snowfalls become rare. In Farah, located in the south-west at 750 metres above sea level, the average temperature goes from 8 degrees in January to 33 °C in July. In Kandahar, located in the southeast, near the desert, 1,000 metres above sea level, it goes from 6.5 °C in January to 31.5 °C in July. The winter is mild enough, even though it's cold at night, with possible frosts. Summer is very hot, and as usual sunny.
Here are the average temperatures.
Average temperatures - Kandahar
KandaharJanFebMarAprMayJunJulAugSepOctNovDec
KandaharJFMAMJJASOND
Min (°C)037121519232014930
Max (°C)131623283439403934292216

Rainfall in Kandahar is very poor, since it doesn't reach 200 mm per year. In practice, the only relatively rainy period is from January to March.
Here is the average precipitation.
Average precipitation - Kandahar
KandaharJanFebMarAprMayJunJulAugSepOctNovDecYear
KandaharJFMAMJJASONDY
Prec. (mm)50404515302102620185
Days45631000001323

South of Kandahar there are a wide desert area (regions of Sistan and Baluchistan), occupied by a plateau at an average altitude of 500/700 metres in the western part, where we find Dasht-e-Margo ("desert of death"), and between 700 and 1,200 metres in the east, where we find the Rigestan desert. In the middle, the Helmand river runs, along which some cities are found. Rainfall drops to around 80/100 millimetres per year in the north, and even 45/50 mm in the south.
Here are the average temperatures of Zaranj, located in the province of Nimruz, near the border with Iran, 500 metres above sea level.
Average temperatures - Zaranj
ZaranjJanFebMarAprMayJunJulAugSepOctNovDec
ZaranjJFMAMJJASOND
Min (°C)0381520252725191251
Max (°C)151925333743434137312318

When to go

The best times to visit Afghanistan are spring and autumn, to avoid both the winter cold and the summer heat, generally the months of April and October (and even March and November in the southern deserts); in these months it can still get hot during the day and cold at night. Autumn is preferable because it is drier and less windy.
The mountainous areas above 2,000 metres can be visited in summer, which definitely becomes the best season at higher altitudes, where in the rest of the year frost dominates, except in the far east, which in summer is affected by the offshoots of the monsoon.

What to pack

In winter: for Kabul and the mountains, very warm clothes, down jacket, hat, scarf, gloves; for the plains of the north and Herat, also a lighter jacket for mild days; for Farah and Kandahar, warm clothes, sweater, coat, hat; for the deserts of the south, sweater, jacket, warm jacket for the night, scarf for the sand.
In summer: for the plains of the north and the main cities of the plateau, lightweight clothing of natural fibres for the day, sun hat, desert turban, a sweatshirt for the evening. In Kabul, you can add a jacket for colder nights.
For the high mountains above 4,000 metres, down jacket, hat, gloves, scarf.
For the province of Konar, raincoat or umbrella.

To visit mosques, you must keep your shoulders and legs covered, and bare feet. Women should avoid low-cut dresses.