Why does the river Styx have power over the Olympians?
It depends on the sense in which you mean that the river has power.
The Water Itself, & The Consequences of Breaking the Oath
In concrete, bodily terms, one of the inherent properties of the stream's waters is their high toxicity. Quite aside from the late tradition which has Achilles gain his imperviability by being dipped, as a baby no less, into the Styx, Pausanias' record of the river's corrosiveness, at least in the portion of it which flows through Arcadia, tells us that dipping a baby into this ink-black water should kill the infant, likely quite painfully.
Perhaps the water's quality changes upon its descent from Mt Aroania into the Underworld, where it has a somewhat different effect on the gods. If Zeus or any other deity breaks the Styx oath, the only manner in which he will die is that he will first be comatose for a year and then be banished from the presence of the other immortals for a further nine years (maybe imprisoned in Tartarus all this while?).
According to Hesiod's Theogony, as part of the ratification of the Styx oath, the swearing deity has to offer a libation of Styx water. Homer's Iliad implies that, like humans, the gods make this offering to their own ancestors, who, for them, are Cronus and the Titans housed in the deepest parts of the nether realm. Meanwhile the Theogony might be implying that the swearing god drinks some of this Styx water. If he breaks his promise or is speaking a falsehood, it will be proven by the fact that he will thereafter be unable to eat, drink or breathe. "[S]piritless and voiceless" he will lie "on a strewn bed... a heavy trance" overshadowing him. "But when he has spent a long year in his sickness" a harsher penance "follows after the first."
For nine years he is cut off from the eternal gods and never joins their councils or their feasts, nine full years. But in the tenth year he comes again to join the assemblies of the deathless gods who live in the house of Olympus. Such an oath, then, did the gods appoint the eternal and primaeval water of Styx to be.
The duration of excommunication corresponds to the duration of the Titans' War, which began with Zeus's campaign promise to the family that he would offer big promotions and other goodies to anyone who supported him against his father in the ensuing contest. As Hesiod says, and as yannis has pointed out in his Answer, Styx was the first to come forward to root for Zeus, and part of her reward was the elevation of her name to the height of importance which it gained as the gravest oath.
(The Dictionary of Greek and Roman Biography and Mythology says that "later traditions" supply an inverse rendition of this deal between Styx and young Zeus. Acheron, who like Styx is one of the five main rivers of the land of the dead, originally dwelt in the upper world, where, during the Titans' War, he sided with the Titans, supplying them with drinking-water. After Zeus won the war, he muddied Acheron's waters and cast him into the Underworld, literally bringing his stream down to become an infernal river.)
Hesiod does not explicitly mention or elaborate upon whether the gods actually drink part of the Styx libation and, if they do, whether the one year of entrancement is directly induced by the same water still coursing through their systems. Assuming that both things are so, we can only speculate as to whether this is some spiced-up mojo added to the water or if this is a natural property of the River of Abomination.
The Power as Extrinsic
As for the oath itself and its power, the point of Hesiod's narrative is that this power is a principle to which all of the Olympians subjected themselves in much the same spirit as, e.g. certain modern governmental notions of "the rule of law," when defined as the precept that everyone, including the head of the government (this being Zeus in the case in question), incurs a penalty for breaking the law. Therefore the principle itself is what has power, to the degree by which, as with any law, it is or can be enforced.
Neither Styx herself nor her river actually does anything if the Styx oath is broken. Her name is simply the invocation of the principle. That is, unless we conclude that the libation-water works in the manner in which I have suggested above. In that case then Styx does participate to a fair extent in the oath-breaker's chastisement.
Beyond this, as far as oaths and lies are concerned, the only active role Styx seems to play is mentioned in passing in Book 8 of Statius' Thebaid, as the prosecutrix of the gods, where she "accuses the gods of perjury" while the other main Underworld rivers act as judges of the dead, assisting King Hades in his court. Once again the concept of the rule of the law, instituted by the community of the gods in general, would in this court seem to be the source of Styx's power rather than her possessing it in her own right.
Being the First and Foremost
In his Metaphysics, Aristotle posits the idea that Styx's power comes from her seniority in age and, consequently, from the fact that she is composed of water. In Book 1, while discussing different philosophical propositions regarding the original element(s) and which of them came first, he expounds upon the school of thought which insists that water is the primal element of existence, the oldest substance in the universe.
There are some who think that the men of very ancient times, long before the present era, who first speculated about the gods, also held this same opinion about the primary entity. For they represented Oceanus and Tethys to be the parents of creation, and the oath of the gods to be by water—Styx, as they call it. Now what is most ancient is most revered, and what is most revered is what we swear by.
In Iliad 14, Homer does indeed trace the origin of the gods to Oceanus and Tethys, which is corroborated by Orphic Hymn 83 to Oceanus. Here he is said to be the progenitor of both the gods and humankind. Meanwhile Hesiod implies that he is the firstborn of all the children of the Sky if not also of the Earth.
Hesiod also tells us more explicitly that Styx is the eldest daughter (perhaps even the eldest of all the offspring) of Oceanus. Ten percent of all the fresh water in the universe is allotted to Styx's stream, surely making her, next to her father, the mightiest of all the world's rivers, and also, like her father, a sizeable component of the superstructure of the cosmos. Regarding these aspects of her power, I am taking it for granted that she was simply born with all these strengths and qualities.
More of Zeus
Finally, it seems to me that Styx is, at least in some loose sense, an echo or a metaphor for the dark or retributive side of Zeus' royal power. Styx's children—Victory, Zeal, Mighty Force, and Violence—through whom she herself got into Zeus's good graces, are simply personifications of prerogatives borne by the king of the gods. Calling them his personal bodyguard is merely an expression of the Thunderer's own power.
The connection between Styx and Zeus themselves is subtler, as she bears more proximity to the Underworld version of Zeus, i.e. her direct supervisor Hades. Apollodorus, however, mentions a version of Persephone's maternity which acknowledges the closeness of the link between the king of the gods and the great Underworld river-goddess, wherein Zeus becomes Persephone's father by Styx rather than by Demeter. (Although Aaron Atsma does point out that this Styx mother of Persephone might only be the wrathful Erinys form of Demeter.)