Neither one is better. Both are correct.
Where I live, people more commonly say "Please switch the light on."
But if there are many words between "switch" and "on", we will put "switch on" together.
That is, we would say, "Please switch on the light over the kitchen table."
We would not say, "Please switch the light over the kitchen table on."