First things first, :welcome:
It's possible your switch may be bad; that is one of the most common problems.
If it is a tailcap switch, remove it from the light. Next, take something metal and short the end of the flashlight body to the battery contact. If it lights up, the switch is faulty.
For an inline body switch (like a c/d cell maglite switch), that is a bit more complicated. If you can take it out, you could test it with a continuity tester on most any mulitmeter or ohmmeter. If there is little to no resistance or ohm value, it's good. If extremely high or infinite resistance, it's faulty. If you can't get the inline switch out, not sure what to tell you at that point. Maybe someone else can suggest something.
Hope this helps. Good luck.:)
PS: If it is an incan bulb, swap with a known good bulb. You could also test the bulb just like the inline switch with the same procedure.