October through March is the only comfortable time to visit. Temperatures during these months are 18–28°C by day, though nights can get cold enough to need a proper sleeping bag if you are camping. This is also when birdlife is at its richest — migratory birds use the inland sea as a stopover, and flamingos can be seen in good numbers.
April and May are transitional and still manageable, though warming rapidly. June through September is genuinely dangerous for extended outdoor activity: temperatures regularly exceed 45°C, humidity is high near the coast, and camping becomes something you would do only in an emergency. The sea itself is warm to hot. Some tour operators stop running desert trips entirely in these months.
Weekends (Friday and Saturday) from October through March see the most traffic from Doha residents; if you want the dunes relatively quiet, go mid-week.