Spring (April–May) and autumn (September–October) are the best times to visit. Temperatures are comfortable for walking the walls and the old city, and the crowds are thin. Diyarbakır sits on a high plateau and the summer heat can be brutal — July and August regularly exceed 40°C, making afternoon sightseeing unpleasant. Winter is cold and sometimes snowy but perfectly manageable; most sights are open year-round.
The watermelons are a reason to visit in July and August despite the heat. Diyarbakır watermelons — grown in the hevsel gardens in the Tigris flood plain — have a justified reputation as the best in Turkey, and the whole region celebrates them. The annual Watermelon Festival is held in late summer.
Newroz (Kurdish New Year), celebrated around 21 March, is one of the year's big events — the streets around Sur fill with people and the atmosphere is festive. It's a politically significant occasion in this part of Turkey and draws large crowds; worth timing a trip around if you're interested in Kurdish culture.