What is the origin of The Twins in The Matrix: Reloaded, and how is it that they're so ridiculously powerful?
We don't know for sure, but they seem to be examples of "ghosts" that people occasionally see and which are doing something they're not supposed to be doing:
The Oracle: ...There are programs running all over the place. The ones doing their job, doing what they were meant to do, are invisible. You’d never even know they were here. But the other ones, well, we hear about them all the time.
Neo: I’ve never heard of them.
The Oracle: Of course you have. Every time you’ve heard someone say they saw a ghost, or an angel. Every story you’ve ever heard about vampires, werewolves, or aliens is the system assimilating some program that’s doing something they’re not supposed to be doing.
Neo: Programs hacking programs. Why?
The Oracle: They have their reasons, but usually a program chooses exile when it faces deletion.
Neo: And why would a program be deleted?
The Oracle: Maybe it breaks down. Maybe a better program is created to replace it – happens all the time, and when it does, a program can either choose to hide here, or return to The Source.
Because they are not doing what they should be doing they are therefore Exiles (programs intended for deletion), like most of the Merovingian's other henchmen. Also like most of the Merovingian's henchmen and in keeping with their ghostly nature, they are probably from the Nightmare Matrix (the second Matrix beta), which contained many other frightful creatures sure as vampires and werewolves. The programs from the Nightmare Matrix are powerful and have superhuman capabilities at least in part due to their need to frighten bluepills. Also, they may also have been used as the Nightmare Matrix's equivalent of Agents since Agents are also very powerful, similar to how the Seraphim are angelic Exile programs which acted like Agents in the Paradise Matrix (the first Matrix beta).