Cairo, where it is

In Cairo, a metropolis of northern Egypt and the capital of the country, the climate is subtropical desert, with very mild winters and hot and sunny summers.
Here are the average temperatures.
Cairo - Average temperatures
Min (°C)91012151820222221171410
Max (°C)192024283234353433292520
Min (°F)485054596468727270635750
Max (°F)666875829093959391847768

The city is located near the large delta of the Nile River, where the presence of streams and cultivated fields increases relative humidity. The city has grown over the decades to the point of even approaching the pyramids of El Giza.
The hot desert wind, the Khamsin, blows especially in spring, bringing scorching heat, accompanied by dust and sand. When of this wind blows, the temperature can exceed 40 °C (104 °F) from May to September, and reach 37/38 °C (99/100 °F) in April and October.
Rainfall is definitely scarce, since it amounts to about 25 millimeters (1 inch) per year. In the wettest years, it has slightly exceeded 100 mm (4 in). The rare rains occur in the form of showers, between autumn and spring, with a higher probability in winter. However, being concentrated in time and falling on a dry soil, which is unable to absorb water, when the rains are intense, they can cause flooding.
Here is the average precipitation.
Cairo - Average precipitation

Winter, from December to February, is very mild, with pleasant and sunny, spring-like days: highs are usually about 20 °C (68 °F). However, every now and then, because of cold air masses from Eastern Europe, some days can be a bit cold, with highs about 5 °C (41 °F) and lows about 10/13 °C (50/55 °F). The rains are very rare, and may not even occur for a whole month.

Spring, from March to mid-May, is sunny and pleasantly warm, but there may be some hot days when the Khamsin blows. In March, it can still be a little cold at night, especially in the first half of the month.

Summer, from mid-May to mid-September, is hot and sunny. While waves of scorching heat are still quite frequent in May and June, the atmosphere progressively stabilizes, and air moisture becomes higher, with an annoying combination of heat and humidity, whose climax is reached in August. Within the big city, the heat is felt more, also because of pollution.

Autumn, from mid-September to November, it's hot but without excesses, although some hot days can still occur in early October, when the Khamsin blows, and then it becomes progressively milder, getting pleasantly warm in November.

Cairo, houses and pyramids in the background

In Cairo, there's plenty of sunshine in summer, when blue skies prevail. In winter, there are many sunny days as well, but a cloud system can sometimes affect this area, bringing some cloudy days. Here are the average sunshine hours per day.
Cairo - Sunshine

Best Time

The best time to visit Cairo and the pyramids of Giza and Saqqara is from October to March, since in the other months it can be hot. In winter, especially in January and February, some days can be a bit cold and cloudy, while in March, and sometimes in October, the wind from the Sahara can blow, accompanied by dust and sand; consequently, the best month is November, when this risk is lower.
In summer, for example in August, the heat is not as intense as in the south of Egypt, but it can be uncomfortable to visit the pyramids under the blazing sun. Therefore, you can choose the first hours of the day, however, it's not easy to find a place in the best hours, since in this period there's plenty of tourists.