Assuming your wiring is based on "standard" convention, green would be ground, attached to the grounding lug on the switch. Black and red would be the switched pair, hooking one to L1 and the other to L2. A switch does nothing more than establish or break contact between to conductors, so I expect it not to matter which of the red or black go to L1 or L2.
It is possible that your blowing of circuit breakers has nothing to do with your switch wiring. Is it possible you have a failed (shorted) light fixture? Have you performed any maintentance which could have damage wiring?