I think this is just confirmation bias on your part. There're plenty of counterexamples.
You mention horror, but Stephen King's children are rarely stupid (It, Salem's Lot, The Shining). In George R.R. Martin's Song of Ice and Fire, children are no more likely to be stupid than adults. Someone else already mentioned Harry Potter, but I can add Percy Jackson and His Dark Materials to the list (in fact, juvenile fantasy seldom portrays children as stupid, given their target audience).
So yeah, maybe its just the books you read