What is the best time to travel the Danube cycle path?

If you intend to cycle anywhere in between the source and Budapest (Hungary's capital), go for May to September. While it is possible to cycle in April and October too, have in mind that temperatures in these months will be rather low and days shorter.
July and August may bring the one or other very hot day (32°C and more after mid-day, [>90°F]). In July and August more families with kids are seen along the cycle paths as this is the school holiday season in Germany, Austria and Italy. Nevertheless, there is plenty of space for all cyclists and it's generally fun to see cycling folk passing by at a break knowing that you will overtake and salute them later when they take a rest.

If you plan to cycle in Hungary and beyond, think about traveling late spring (May, June) and early autumn (September, October). July and August will definitely be very hot.

Fun fact: The longest days (and the days with the latest sunset) happen to be in the second half of June.

Expected mean daily maximum temperature in Regensburg

We had a look at the daily maximum temperatures in Regensburg, most northern city of the Danube, and calculated the average for each month. (click the chart to enlarge) As you can see, May to September is fine for cycling. But in October already, the thermometer will rise to 13°C only (55°F), each day, in average.