Most of the Middle East is best visited in autumn and spring (September to November and March to May). December and January can be fairly bleak and overcast everywhere in the region; even in southern Egypt and Libya night-time desert temperatures can be bitterly cold. Unless you're an avid sun-worshipper or water-sports freak, the summer months of June through to September should definitely be avoided - it's just too hot to do anything. In July and August visitors to the Pharaonic sites at Aswan and Luxor in Egypt are obliged to get up at 5am to beat the heat and don't even think of an expedition into the Libyan Sahara at this time.
There are exceptions. The northeast of Turkey before May or after mid-October can be beset by snow, perhaps even enough to close roads and mountain passes. Parts of Syria and northern Iran also suffer from miserable weather between November and March or April.
When to go
When planning a trip to the Middle East, the two main things to bear in mind are the weather and the religious holidays.