I think Harold has you covered. However, this is assuming one set of wires into the light/fan is the line/power/hot wires from the main panel and the other set is a switch leg going to the switch. Take the cover off the switch and make sure there is only one set of wires (black, white, & ground) coming into it. The white wire if it is a switch leg should have some black tape around it indicating it is hot. If you see any other wires coming in, any red wires, or have a couple 3-way switches running the light/fan then post back cause there are other possibilities that would require some tracing out. Also all grounding wires should be bonded together.