How can I rewire this light switch?
The standard wiring pattern in USA (but not necessarily elsewhere in the world) for 110/120 AC is


  black - hot
  white - neutral
  bare or green - ground


The hot wire brings the current to the outlet or fixture, often through a switch.

The neutral completes the circuit back to the panel. 

The ground is a safety mechanism that, hopefully, will shunt the hot current to the ground (literally) rather than through a person if there is a short. 

The terminals of a single pole switch (the only switch in a circuit and turning on/off one device or one set of devices) get the black wires, one on each terminal. Many switches also have a grounding terminal. This is not one of the switch terminals, but is usually a green screw on the metal strap of the switch frame, often on the opposite side from the terminal screws.

In general the white wires in a box should always be connected to each other, and never to or through a switch.

Similarly, the ground (bare) wires should be connected to each other and to the ground  screw if the switch has one.

In your case, one set of wires (black, white, bare) are the source of the power, and one set (also black, white, bare) go to the fixture.

More complicated systems are possible with more colors, more switching choices and other configurations, but they don't apply in this case.

To work on this, make sure that the power is off (a non contact tester is best), before handling any wires.