Both are good. 'Do you like cakes?' suggests that there are a variety of cakes, perhaps on offer... hmm. Chocolate cake, fruit cake, Battenburg cake. What a tasty question.
'Do you like cake?' asks if you like the foodstuff, cake. Any cake.
'No, I can't stand the horrible, spongy stuff!'
'But surely you like chocolate cake?'
'Not even strawberry cake?'
'No. I told you. I don't like cake.'
I like all cakes except those with icing on.
I like cake in general.
[Not a teacher anymore]