Adding to Alex's answer, There seem to be at least 2 factors in choosing a time signature
First way is disregarding duplet/triplet feel
one is how many beats there are in the bar, so often in the case of 7/16 it's all about just the number of 16ths in that bar. in many prog rock passages and places where the time signature is constantly changing it's because the player wants to extend a repeated phrase by an odd amount so they'll just stick the notes in the phrase and change the time signature bar to bar.
As a practical example, suppose you have a phrase of nine quavers, grouped 3 3 3. One way often used by prog rockers is to alter one group to be different lengths in a passage(let's use the last group here), so perhaps it would go 333,336,333,332. In time signature terms what you would have there is 9/8,12/8,9/8,8/8, It doesn't make sense to define the 8/8 bar as 4/4 because it breaks the pattern.
The second way is considering the feel
This is where 3/4 and 6/8 commonly differ. As you may know 3/4 is counted in duplets or 1+2+3+(3 groups of 2), whereas 6/8 is counted in triplets or 1+a2+a(2 groups of 3)
The same can be applied to 4/4 and 8/8, where the difference is that 4/4 is counted 1+2+3+4+(or 4 groups of 2)
but 8/8 can be grouped as (3 3 2),(3 2 3) or (2 3 3)
in the example of 332 this would be counted 1+a 2+a 3+
You could arguably use 4/4, but in this case 8/8 suggests the feel better.
Also for extra fun, here is my favourite example on 8/8 time signatures