Who wrote the separation of powers?

The actual idea was put forth by Baron de Montesquieu who came up with the concept.

If you are asking specifically about the US Constitution, it is the combined product of all the framers of that document and cannot be attributed to any one individual.