This depends on what you want to do. Walking around in Upper Egypt and Luxor can be extremely hot in the summer months (June to August), the best time to go is from October to may.
The summer period is the busiest period on the Mediterranean Se, because that is the time, the Egyptians go on holiday themselves, to places like Alexandria.
The most ideal time for the whole country, by the way, is the period of from mid-March to mid-april; plenty of space on the beach and pleasant temperatures,
Even the months of October and november can have temperatures well above 30 degrees. In contrast, the winter months can be very cool in the evening. Keep this in mind when chosing clothing and activities.
Exceptions confirm the rule, as always and it is the same here. Just as an indication that experiencing certain temperatures differ from person to person: the webmaster of the Nile Valley Website doe not mind to, for example in the month of August, travel to Luxor. He experiences temperatures of around 45 degrees as warm, but certainly not as unpleasant:-)