Услышав эту песню, я вспомнил времена, когда я был ребёнком.

English Translation

When I heard that song, it reminded me of when I was a kid.

Why isn’t it времену if it’s accusative?

From the Wikipedia declension for время:

singular plural
nominative вре́мя времена́
genitive вре́мени времён
dative вре́мени времена́м
accusative вре́мя времена́
instrumental вре́менем времена́ми
prepositional вре́мени времена́х

While it’s true that singular nominative nouns ending in -а (which are usually feminine) form the singular accusative by changing the -а to -у, it is not true that plural nominative nouns ending in -a form the plural accusative by changing the -а to -у. And vремена is a plural nominative (or plural accusative) noun, even though it may not look like one.