Connect white to white and black to black. Green is your ground.
Here is a link from where you can get a step by step guide to connect a light to the switch. It is shown by the diagram. Have a look:
I have 2 black wires and 2 white wires coming out of the wall. The 2 white wires are connected and the 2 black wires are lose.. Thet work off a light switch. How do I connect this to a light??