By far the best times to visit Istanbul are spring (April and May) and fall (September and October), when local kids are on a school schedule, the daytime weather is in the 60s, and the nights cool off pleasantly.
In summer, average temperatures are in the low- to mid-80’s, though on rare occasions it hits 100-plus degrees. Warm weather brings most of the art and music fests: The Istanbul Foundation for Culture & Arts organizes dance, film, theatre, and puppet festivals (April/May); jazz and music (June/July); and a biennial in the fall.
In winter, it can get cold and wet enough to snow, though the average high is around 50, and the precipitation is usually rain. Thanks to its maritime location at the nexus of the Sea of Marmara, Bosphorus, and Black Sea, it can get both windy and humid here—and there’s fog more than 200 days a year (though it usually burns off in late morning).
It’s not just weather to consider: Religious holidays create seasons of their own. During the month of Ramadan (usually around July and August), holy sites can be crowded, traffic right before the evening meal can be heavy, and restaurant service can be irregular. During Kurban Bayramı (around October/November), the most important Islamic festival of the year and a five-day public holiday, hotels fill up, banks close, and ATMs can even run out of money. If you really want the city to yourself (along with cheaper hotel rooms), and can handle some chill and precipitation, travel here in March and November.