Is the first "when" necessary?
I still like listening to the songs when I used to listen to when I was teenage.
I still like listening to the songs I used to listen to when I was teenage
Not only is it not necessary, it makes no sense to include it. "Songs when I used to listen to" is not a valid restrictive clause for the noun "songs". You could say "songs that I used to listen to", to qualify "songs" and reduce the possible reference set from "all songs". Then "that" can be left out to get your second sentence. But the first "when" is ungrammatical.
"When I was teenage" is also a bit awkward; it's not wrong, but it's more idiomatic (at least in the US) to refer to being a teenager than to refer to having the quality of being teen-age.
The sentence without a relativizer between songs and I is just fine; but you can't put when between them.
If you use a relativizer it points backward to a referent and forward to a 'gap', a missing term in the following clause. In this case, songs is the referent, and the 'gap' is the object of the preposition to:
... songs whXXX I used to listen to ___ when I was a teenager. ^______________________ ^
Songs is a noun, and the object of a preposition has to be a nominal; so your relativizer has to be a relative pronoun which designates an impersonal nominal. It has to be either which or that.
... songs which I used to listen to ___ when I was a teenager. ^______________________ ^
You are permitted to delete a nominal relativizer unless it acts as the subject of the clause; that's why your second sentence is acceptable.