The outlet works but the light switch wont turn it on and off, why?
If it is single switch (i.e., no other switches control the light), the hot wire (black wire) should be going to the switch before it goes to the light. If so, you can tie the black, white, and green wires going to the outlet to the black, white, and green wires on the line side of the switch. Leave a comment if that is not enough detail for you.