Troubleshooting through continuity.
You'll need a few things, like the non-contact voltage tester, a continuity tester (a cheap one with a light will work) and replacement wire-nuts (unless something different is required where you live). Never, never ever (did I say never) use a continuity tester on a live circuit.
Turn the breaker off and tag it or lock the panel to keep anyone from turning the power back on...been there done that. Remove the light fixture from the ceiling and remove what wires are connected. Even after turning the power off, always use a voltage tester or a non-contact voltage tester to make sure there is no power where you are working. If you are uncertain about how to wire it up later then you probably should not be doing this.
After you are off the ladder and have the fixture where you can comfortably check it you can now check for continuity. You probably have two black wires and two white wires and maybe a ground. Put one end of the continuity checker on the end of the black wire and then touch the other end to the center tab of the socket. You should have continuity. If not you have a faulty socket. Now to check the white wire to the continuity tester to the end of the white wire and then to the metal threaded part of the socket. If no continuity then the socket is bad.
If all this is good then the problem is either the switch or a wire-nut / connector.
If you want to check the continuity on the switch, remove the switch from the wires and put the continuity checker on the screw terminals. Turn the switch on and off and the continuity checker should mimic the switch.
When you button everything up just make sure you do it correctly. Wire-nuts have a certain way that they have to be done so Google wire-nuts and learn how to do them. Never re-use wire-nuts. Use care when rewiring the switch. It's a little harder to do correctly, but a lot harder to troubleshoot if a wire slips out.