The AI picks which shot depending on hard coded ranges. It might be worth looking into making those number refer to the parameters defined for UFOExtender accuracy though (Meridian!). If my reading of the source is correct, when the unit is:
within 4 tiles:
Auto shot if it has TUs for it
Aimed shot if it doesn't have TUs for Snap or Auto
Snap otherwise
more than 12 tiles away:
Aimed shot if it has TUs for it
Snap if less than 20 tiles away, didn't have TUs for Aimed but has TUs for snap
Then there's 3 range independent clauses which are probably to catch odd edge cases, where the priority is given to snap, then aimed, then auto shots.
Thanks to the edge cases, an AI unit would be able to fire a HMG if more than 4 tiles distant, since it will fail every check until the very last decision to take an autoshot since it has TUs for it. Similarly, at range > 12, it would prefer to use an aimed shot over a snap shot so use a sniper rifle properly.
Now if you have a good rifle (BlackMarch SMG?) with snapRange of 15, the AI might be better off using snap shots when within 15 tiles instead of 12, so that's a case where the hard coded range bands are not quite accurate but it's not that terrible to use a aimed shot in that case either (I use aimed shots a lot, as I value hitting once more than the chance of hitting twice). The AI does use the various shots in the cases where they would generally make sense, but would probably benefit a bit from getting the autoRange and snapRange of guns from the ruleset, if available.