According to www.sharefaith.com, Fairest Lord Jesus has a "somewhat elusive history. It is thought to have originated as early as 1607, possibly written by German Jesuits, and called Schnaster Herr Jesu. It first appeared in print in 1677, in a German Roman Catholic publication, but with author unknown. The first three stanzas were translated into English by an unknown. The fourth stanza was added in English by Lutheran pastor and theologian, Joseph A. Seiss in 1873.
"Originally this song was most likely sung to a Gregorian Chant by the Jesuit monks. The music for this hymn that was most popular with 17th century German peasants was a tune from an ancient Silesian folk song. In 1850, Richard S. Willis, composer of the music for It Came upon the Midnight Clear, arranged the folk song for use in church hymnals."