Some people say that whistling is not proper conduct for a Jew, that it is associated with demons or angels, and has all sorts of negative effects. However, there is actually nothing wrong with whistling; in fact, whistling is associated with the coming of Moshiach. Hashem says, “Eshreko lahem va'akabtzaim”, “I will whistle to them and gather them.” Of course, there is positive and negative whistling, like everything in this world. If whistling is done with a simcha shel mitzvah, in an appropriate manner, it is acceptable, and the Rebbe encouraged whistling many times during farbrengens. This might be confused with something else: blowing out a candle, which is considered inappropriate. It is brought down in seforim that blowing out a candle is considered a form of sakana, danger. In fact, some seforim say that saying fui or fe to extinguish a candle is the name of a malach and should not be said, and therefore candles should be extinguished in a different manner. This may be the source of the confusion, giving people the impression that whistling is unacceptable for Yidden.
כלבו קיח. ראשית חכמה בחופת אליהו רבה ג. והוב״ד בבא״ח ש״ב פינחס יח. לחה״פ יו״ד קטז, ה. כה״ח שם קטו. ועוד. וראה שו״ת יבי״א ט, צה, יד.