Mind Flayers are EPIC, straight up. The are the kind of arch-foe you can design a campaign around. Using them as some random creature encounter in some room in a dungeon is a complete waste, not to mention totally illogical. It is almost a certainty that any dungeon they are in, they are the masters of. Consider the following.
Their Intelligence Considered
Let's start with their lawful evil alignment and genius-level intelligence. They WILL be well prepared, and they WILL have contingency plans. That means they will not be easy to kill, and they most certainly will not fight to the death. In other words, they should NOT be played like "psionic orcs".
Mind Flayers are the ultimate EVIL GENIUSES. For one, that means they have PLANS, big plans... For two, that means they have slaves, lots of slaves. And minions, lots of minions. They look at the world world like we look at the animals in the zoo: a bunch of lesser beings to be collected and manipulated as they see fit.
They leave nothing to chance, they have thought out the moves ahead of time, and they taken precautions. They will have foreseen every danger and opportunity, and just about anything done to oppose them, like a chess grandmaster, they will have moved their pieces to be ready, ahead of time.
The hard part about playing Mind Flayers is playing them with GENIUS intelligence, as that means, frankly, they are smarter than we are. Keep in mind, the only things as smart as them, among evil creatures, are liches and demon/devil lords. Use them as such!
Think of the Rebel Alliance in Return of the Jedi. They thought they were getting somewhere, planning a secret attack on the under-construction new Death Star, sacrificing their Bothan spies to gain crucial information, sneaking around in stolen ships to penetrate the Empire's defenses.... But in reality, IT WAS A TRAP! The Emperor was controlling the situation the whole time! They were just performing as pawns in his evil scheme! Mind Flayers are like THAT. They own you, and you don't even know it yet. The even attack like the Emperor: look at their entry in the MM, holding out their hands, frying those poor suckers with brain waive bolts through the air....
Their Physical Powers Considered
They are 8+4 HD, with AC 5, in other words, NOT easy to kill, even in hand to hand combat. Each one of its 4 attacks per round means INSTANT DEATH in 1-4 rounds. It will SUCK YOUR BRAINS OUT, in exactly d4 rounds! Do you really want to rely on "d4" rounds to get that thing's tentacles out of your nostrils??? Not just no, HELL NO!
An 8 HD monster, with 4 attacks per round, that will lead to instant death. HOLY SHIT! Their THACO is a fricken 12! Who wants to mess with a monster like that??? No one with any sanity would come anywhere near it. If you are powerful enough to kill it in 1-4 rounds, it will know it (see Their Psionic Powers Considered below), and it will come no where near you! It is not dumb.
Their magical resistance: 90 FRICKEN %! 9 out of 10 spells you throw at it, it will just shrug off, no need to even save, just totally and completely unaffected. In other words, you are burning through a busload of your best stuff, magical ultra-shit that lays waste to armies, and that Mind Flayer in front of you is just like, "Meh". What are you going to do now, bad man? Go hit it with your staff? And expose yourself to the 4 brain-sucking face tentacles???
They can physically levitate at will, as well as feather fall and walk on water (Body Equilibrium). A nice addition in combat for sure, but just think of the possibilities that gives for its lair.... It will NOT be your standard flat layout dungeon with flat levels and locked doors. If you can't levitate up and down tubes, for example, you have no hope of reaching it.
Their Psionic Powers Considered
Let's start with Domination. It can simply take over your mind and force you to do its will. You get a save vs magic, or it can tell you to jump off a cliff, or stick your sword through your best friend's eye. Yes, Domination CAN force you to do self-destructive things. It costs "double or triple" the psionic points, but, trust me, it has plenty to spare. Of course, domination also means it can control other monsters, using them as its bodyguards for example, sicking them on you at key moments of its devising...
ESP, yup, they got that. It can read your mind, NO SAVING THROW. This is part of the reason it is always so well-prepared against your attacks. This bitch is DANCING IN YOUR HEAD. All of your secrets, all of your plans, all of your tactics, all of your weaknesses, are now its knowledge. Your twin sister you were hiding from him, he knows that shit now too, sucka.
Astral Projection means it can spy on you, or any one else for that matter, using its astral body. Another reason why its preparations are so meticulous. If you are on its radar as an enemy, it will be using astral travel to keep tabs on you, probably laying traps and obstacles in your way as it can. If you dare enter its lair, it will spy on you with its astral body, and do an ESP scan, before it ever comes into your physical presence. Think about it!
Probability Travel means that it doesn't just "run away", it can blink its body out of trouble, traveling to the ethereal plane, then onward to who knows where. It can actually blink two other people out with it. Nice way to kidnap someone, don't you think? If it gets in trouble in its lair here, it just blinks out and escapes to its well-prepared fortress in the other reality. How you gonna kill this thing???
Oh yeah, of course it also has 241-340 points of psionic ability. Let me remind you, this is at the max upper range of anything a given human could have.
Even if you are a non-psionic, it will Psionic Blast the shit out of you. You get a save based on your INT+WIS. Failing your savings throw, the average range of people will be stunned, confused , enraged, or panicked. The smarter you are, the more likely you will be driven insane!
Their Treasure Considered
If you somehow manage to chase it out of its lair, you stand to reap a decent haul. Treasure type B is a large cross section of metal coins, although they are at a low percentage chance. Types S and T offer the possibility of potions and scrolls. Type X offers a good chance of a miscellaneous magical item plus a potion. Hardly seems worth it, if you ask me. Given around 36 hp, you will get 2232 XP for defeating it. Shit, good luck with that.
Mentally unbalanced high-level PCs might consider invading the lair of these things, just for the shits and giggles of the Cthulu experience. For the most part, PCs will probably have to be enticed to engage these wicked beings. Some ideas:
--Mind Flayers as worship object of an evil cult: in the attempt to wipe out a wicked human-sacrifice cult, PCs are lea into the Mind Flayers' underground lair. Location: Chaco Canyon
--Mind Flayers as evil geniuses behind human wars: troubles are being stirred up, and investigation leads to Mind Flayer influence which needs to be stamped out. Location: Flagstaff
--Gith intrigue: Githzerai war parties come to the local human authorities to request clearance to engage in Mind Flayer hunting; PCs sent to tag along, monitor progress, and perhaps assist. Location: any city
--Grimlock invasion: Access to subterranean world opened up following Grimlock attack upon the upper world, Mind Flayers as the ultimate instigators. Location: any city