Gene Veith, writing in World Magazine:
“For the record, Luther did not take 'bar tunes' and put biblical words to them. That legend comes from a comical misunderstanding. Someone apparently heard a music historian referring to Luther's use of the 'bar form,' which refers to a stanza structure, not to what drunks sing in a tavern. Luther did borrow and adapt tunes from earlier hymns, medieval chants, and contemporary composers, but a good number of his melodies were his own original compositions.”
If you're interested, check out the 4-CD set, Martin Luther: Hymns, Ballads, Chants, Truth, which Veith reviews in the article linked above.
(HT: Tall Paul)