It takes intellect and imagination to make great sci-fi and that sort of thing is catching when it comes to mapping out your characters. They are, after all, the only means to overcoming the challenges dreamed up by some of the most intrepid dreamer minds in cultural history.
In Star Trek, we're also blessed with a higher class of intellect because of the requirements of getting anywhere near the upper echelons of Starfleet - or conversely becoming a threat to those figures - which means that the collective IQ on any of the shows or movies is probably higher than other franchises put together.
But who is the brainiest of all the brain boxes in the known Star Trek universe? That's the real question we must boldly answer...
Reg Barclay is a way more crucial figure in Star Trek than anyone could have imagined initially and one far more intensely loved by the fanbase to boot. He's also a pretty smart guy at the best of times (something he rarely gets credit for), but his intellect only really challenges the top 10 at one point.
During The Nth Degree, Barclay is "infected" by a Cytherian probe and merges with the ship's computer, before jumping the ship at higher-than-warp speed to meet the Cytherians, who might well be the laziest race in the galaxy. They're benevolent, but their body snatching is designed to help them learn more without ever having to leave their home. And unfortunately for Reg, the intellectual upgrade side-effect of the probe is removed just as quickly as it arrives.
A nod must also go to Bashir, the smartest man on Deep Space Nine, Quark (who is by far the most CUNNING character) and Geordi LaForge. But they JUST missed the cut...