Is there any problem with whistling in general or to a tune, and is there any difference between whistling during the week or on Shabbos?
In general there is no problem in doing so, though some say that it is not ‘respectable’ practice. Concerning Shabbos, Rema (Orach Chaim 338:1) writes that it is permitted, and Aruch Hashulchan (7-8) adds that it is permitted even when a person whistles by means of placing finger(s) in his mouth. This final point is disputed by Mishnah Halachos (vol. 4, no. 55).