What is the origin of the pejorative idiom "You Doughnut"?

Solution 1:

If you're an idiot, your head is like a ring doughnut - it has a big empty space in the middle i.e. where the brain should be.

That's the analogy I assumed gave rise to the insult.

Or could be because dough is dense; 'dense' and 'thick' are two insults in British English used to mean stupid. Plus, nut is a colloquialism meaning head. Doughnut; thick in the head.

All just speculation on my part, I'm afraid.

Solution 2:

The expression came from the 1970s UK kids tv show The Double Deckers. Doughnut was an overweight slightly daft character and it became a common light insult in playgrounds. I assume mostly in South East.