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. Over the decades the city has expanded to the point of approaching even the pyramids of El Giza.
The hot desert wind, the Khamsin, blows especially in spring, bringing a scorching heat, accompanied by dust and sand. Because of this wind, 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 very 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). The rains are very rare, and may not even occur for a whole month. Every now and then, some days can be a bit cold, with highs about 5 °C (41 °F) and lows about 10/13 °C (50/55 °F), when cold air masses come from Eastern Europe.

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

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

Autumn, from mid-September to November, is warm, and it's usually not excessively hot, 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 sometimes a cloud system can affect this area, bringing some cloudy days.
Cairo - Sunshine

Best Time

The best time to visit Cairo and the pyramids of Giza and Saqqara is from October to March, since the other months 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 less intense than in the south of Egypt, but it can be hard to visit the pyramids under the blazing sun; therefore, you can choose the first hours of the day, when, however, it's not easy to find a place in the best hours because in this period there are a lot of tourists.