In Italian, we use the expression Sei scemo o mangi sassi? which can be literally translated as "Are you stupid, or do you eat rocks?" It is a way of saying "You are stupid."
What is the more idiomatic way of translating it?
It's easy enough to find sarcastic ways of telling someone they're stupid, but translating the Italian expression while keeping its sense and force is tricky.
The literal sense is not obvious to me. The only interpretation that suggests itself is that it contrasts innate stupidity with deliberately acquired stupidity, induced by eating rocks. If this is the case, then it falls in line with a well-known class of English-language insults:
Are you naturally incompetent or did you have to practice?
You a natural-born bitch or you just tryin to piss me off?
Are you naturally stupid or did you take lessons?
ADD: This appears to be the sense of Carlo_R's version, "Ci sei o ci fai?", approximately "Is that who you are or are you just pretending?"
That leaves the "eat rocks" piece to deal with. As Messrs. Schwartz and Au observe, "rocks" are associated with stupidity in English—“dumb as a rock, as a box of rocks”, “head full of rocks”—but eating rocks would be taken as a symptom of stupidity, not a cause of it. Your translation would have to convey that causality explicitly:
You naturally stupid or'd you eat rocks to get that way?
But that's still not entirely satisfactory. Traduttore, traditore. (The only Italian I completely understand!)
Any of the various ways English speakers tell people they are stupid will do. The best one depends on the contexts in which Italian speakers would use that particular idiom or the age and social status of the people speaking. You would want to pick the phrase English speakers would likely use to convey "you are stupid" in that same context.
Possible choices: "Dummy!", "Idiot!", "Are you really that stupid?", "You're dumber than a box of rocks", "Where were you when God gave out brains?", "Somewhere, a village is missing its idiot", "If all the village idiots left their villages and formed their own village of idiots, in that village you would be the village idiot", "You're a few cards short of a full deck", "if you were any stupider, I'd have to water you", and so on.
The equivalent English expression is, "do you have rocks in your head?"
I would say the closest to an English expression with the same connotations, would be something like:
Are you trying to be stupid, or does it just come naturally?