I think that formians are "live" creatures, so they dont have be imune to sneak attacks.
why formians are imune to sneak attacks ?
Because Formian are in constant communication telepathically. Therefore they can't be sneak attacked because other Formian "see" you and warn them. Just like in combat when an NPC has engaged you personally you can't sneak attack them. That is the reason.
I think it's a weird explanation personally. When you look at it mechanically, you don't have to have your opponent not know you're there, to sneak attack them. Some examples:
1) Tanglefoot bag: You can be looking right at someone, but if you're tanglefooted, they will sneak attack you to your face.
2) Bluff your opponent(not actually implemented in NWN1...but...yeah) into thinking you will move one way, when you move another, opening them up for a sneak attack(s).
Hard to sneak attack if they're missing internal organs, or have no weak spots, or lack brains and only have ganglia.
Ants don't have much in the way of anatomy.
They have weak points just the same as any other 'monstrous' race does, like spiders, ettercaps, and hook horrors, whom are not immune to sneak attacks, and very likely similar physiology.
Eyes, points in the joints where there is no chitin, to allow movement of limbs. The head itself is nearly always an extremely weak point at least in some part.
A single formian that is not with it's hive can be flanked, but if there are 2 or more they can not because they act as a single unit.
Meldread has flanked the correct.