From Wikipedia:
The most popular melody for the Hanukkah hymn has been identified by Birnbaum as an adaptation from the old German folk-song "So weiss ich eins, dass mich erfreut, das pluemlein auff preiter heyde," given in Böhme's "Altdeutsches Liederbuch" (No. 635); it was widely spread among German Jews as early as 1450. By an interesting coincidence, this folk-melody was also the first utilized by Luther for his German chorales. He set it to his "Nun freut euch lieben Christen gmein". It is the tune for a translation by F. E. Cox of the hymn "Sei lob und ehr dem höchsten gut," by J. J. Schütz (1640–1730). As such it is called "Erk" (after the German hymnologist), and, with harmonies by Bach, appears as No. 283 of "Hymns, Ancient and Modern" (London, 1875). The earliest transcription of the Jewish form of the tune is by Isaac Nathan, who set it (clumsily) to the poem "On Jordan's Banks" in Byron's "Hebrew Melodies" (London, 1815). Later transcriptions have been numerous, and the air finds a place in every collection of Jewish melodies. It was modified to the form now favoured by British Jews by Julian Lazarus Mombach, to whom is due the modulation to the dominant in the repetition of the first strain.