Wiring layouts for lights can vary from house to house. Wiring lights for residential homes is fairly straightforward. Lights use a standard 15 or 20 amp 120 volt circuit. Lights can also be fed by circuits that have other things on them such as outlets.
The power for the light can be in the box for the switch or at the light. When the power is at the switch you will generally hook the hot wire to one side of the switch and the hot wire for the switch leg to the other side. You can use a tester to see which one hot.
The white wire coming back from the light will get hooked to the white neutral from the power feed. The ground wire will always hook to the ground and to the switch if it has a ground lug.
When the power is in the light box, wiring lights is a little different. The white wire in the switch leg is going to be used as a hot traveler to the switch (or coming back from the switch). Some electricians will put black tape on the white when it is used like this. The white or black wire coming back from the switch will be hooked to the black or hot for the light. The white or neutral for the light will be hooked to the white/neutral for the power supply. The switch leg will always interrupt the hot power supply. The switch should always be between the power supply and the light.
Wiring lights in a retrofit situation is usually fairly easy. You hook the wires to the new light the same way they were hooked to the old one. Here's a trick, take a digital picture of the wiring before you take the old light down.