My German is very rudimentary (A1) and I have no regular exposure to the language except what I get listening to Bach. Recently, I have been very interested in Bach's cantatas. It uses text from the Luther Bible, I think. I am in the habit of looking at the text with translation as I listen. I'm curious about the German that Bach used and how it compares to modern everyday German. Is it good learning material for me?
Bach used a German spoken at his time (1685-1750) which is considered as Neuhochdeutsch but it is not spoken any more today. Nevertheless it is still understood.
In addition to this a lot of changes to grammar and spelling were done for rhyming so that stanzas fit to the melody.
In this short choral we can already see many such expressions (modern German in brackets):
This makes me believe that we should not try to learn contemporary German from listening to Bach but listening to (or actively performing) Bach's cantatas may help learning pronunciation, which has not changed so much. He also created and used many idioms that are still valid today. These may be much better memorized when having a melody to them.
Enjoy Bach for his music, try to understand the vocals using a dictionary, but do not learn to speak this language as propably native Germans will not really get your point.
Just imagine somebody speaking like Shakespeare whose language is comparably off contemporary English as Bach's is from modern German.
Religious verses in a language of around 1750. This language will hardly help you to read a novel, newspapers or to understand everday German.
I think the wisest to do, is to keep cultivating your interst for those texts, even if that's not modern German. As far as you are aware of those differences pointed out in Takkat's answer, I think it might be rather helpful to have that motivation to learn German.
But that doesn't mean you learn German from Bach's Cantatas. It's the other way around. You learn the modern German and then go to Bach texts:
As a German learner and a Wagner fan some years ago, the first time I saw the word woman in German was in a translation of Die Meistersinger von Nürnberg, where Hans Sachs says
Some time later, the word popped up to my mind and I used while talking with native speakers as if it was just as a synonym of Frau – which sounds awful. Being Bach's Cantata's texts not more modern, I'd advise you to be careful ;)