We use the definite article when something is specific. It can be a single thing in isolation or a group/collection of things that is easily identified.
There are many regional accents in both American and British English. If you were referring to all of them, there would be no need for an article, definite or otherwise, because "I like American accents" would sufficiently convey that you liked them all. So, if the purpose of your example is to simply compare all accents, there is no need for an article. The pluralisation of 'accents' makes it clear you are acknowledging there are many, so all you need to say is:
I like British accents better than American accents.
"I like the British (or American) accents" in isolation seems wrong, but in a context where it is clear that you are referring to a specific set of accents, it could be ok. For example, if you watched a movie in which there were a limited number of identifiable accents, you could say "I liked the American accents in that movie".