What could cause my recessed light to not work?
Any number of things. 


Most recessed light fixtures contain what is called a thermal cutout. These cut off the power to the light when the heat from the light exceeds the temperature rating of the fixture.  They go bad.
Sockets go bad
Switches go bad
Loose wire connections inside the fixture.
Loose wire connections behind the switch.
Loose wire connections feeding the switch from another source.
It is not uncommon for a wire staple to penetrate the wire and over time the wire burns up inside the wall.