Howdy ZeusC6, and welcome to CPF,
It could be several things. Let's start with the battery. What kind of battery is it? Do you know if it's a primary, CR123, or a rechargeable, RCR123? It's quite possible that the battery was old and simply doesn't have enough juice to power the light.
You can find CR123 batteries at most camera stores, but they tend to be expensive ($8), so before getting a new one, you want to clean all the electrical contact surfaces in the light. It's easy, and will only take a few minutes, and you probably have everything you need right around the house.
Electrical contact cleaner is best, but if you don't have any, then look for some isopropyl rubbing alcohol in your medicine cabinet. Also get some Q-tips. It's best if you do this while sitting at the kitchen table. Clear an area and put down a soft towel to put the light on. Unscrew the light where you put in the battery and take out the battery. If you have a battery tester or mulit-meter, then test the battery. If not, continue to the cleaning.
The idea here is to be careful and NOT drip any cleaner down into the light where it could get into the electronics. Now, look down into the flashlight and locate the positive contact. It will be right smack dab in the center. Put a little cleaner on a Q-tip and hold the light face up, with the opening of the tube facing down, then put the Q-tip down inside and clean that center contact.
Now, take another Q-tip, put cleaner on it, and clean the spring in the tailcap. You don't have to be quite so careful here, just clean the spring. At the same time, check that ring for tightness that FlashKat mentioned. It's a little silver ring that runs around the outside down inside the tailcap. You can use a pair of scissors to put into the two notches and turn clockwise to make sure it's tight.
Also, clean that area with a Q-tip and cleaner. Now, clean the end of the battery tube on the main flashlight body, where the threads are. One the very end, it should be shiny, and that is where the electrical connection is made with the tailcap when it's all screwed together.
Finally, clean both ends of the battery. Now, put the battery back in, with the positive end going up into the light, then put the tailcap back on and tighten down well. Hopefully that fixed things.
By the way, if you don't have any electrical contact cleaner of isopropyl alcohol, then just use a clean lint free piece of cloth to clean those areas as best you can. Believe it or not, a clean pencil eraser will work in a pinch.
Let us know if any of this helps. If not, we'll try a few more things. Good luck.