Some of the above answers have done a great job of breaking this questions down, so I'm going to keep it simple. The way I think about time signatures is about feeling.
For instance, if I'm playing in 3/4, then there are three pulses per bar made up of a quarter note for each pulse. If I'm playing in 6/8, then its two pulses per bar with each pulse made up of 3 8th notes. In 12/8, 4 pulses per bar made up of 3 8th notes per pulse.
To expand that, 5/8 is (depending on the accents) 2 pulses per par, one pulse containing 2 8th notes and one containing three 8th notes.
To extend that even further (if you are crazy like me):
19/16:
I would feel it in 3 groups:
1 group of 7/16 - so 3 pulses, 2 pulses of 2 16th notes, 1 of 3 16th notes,
1 group of 5/16 - 2 pulses, one pulse of 2 16th notes and one pulse of 3 16th notes,
and then another group of 7/16.
A lot of this depends on the piece of music of course, as a melody might not be easily subdivided into pulses, but again, these are common ones, and you will be able to feel a large number of tunes with these sort of ideas.
My suggestion is to listen to the music, break it up into recognisable pulses, then work out how the melody travels over them, and then go from there.
Good luck!