It's like saying somebody is not the sharpest tool in the shed.
My favorite way to say that somebody is stupid is to say "Er ist dumm wie drei Meter Feldweg", translates to "he's as dumb as three meters (a bit more than 9 yards) of dirt road".
Reminds me of ones like "You're one fry short of a Happy Meal", or "You've lost some marbles". They generally imply that you've lost or are missing some mental faculties.