It compares the speed of something to the brief blink of an eye.
Here are some ways it's used:
* "The magician made the rabbit disappear in the twinkling of an eye."
* "One minute they were arguing, the next they were gone, in the twinkling of an eye."
* "The storm came upon us in the twinkling of an eye."
It's often used to emphasize how fast something happened, even if it wasn't literally as fast as a blink.