IME, i have found that tires are made to fit a specific Bead Seat Diameter (BSD), usually measured in millimeters. common BSD's are 559mm (aka MTB), 571mm (aka Road 26" or 650c), 622mm (road bike tire, 29er, 700c) and 630mm (old school 27").
the internal or external width of the rim is only of concern as regards ride quality and in extreme cases safety. as in a tire that is 2 inches wide when inflated, let's say, is mounted on a rim with the proper BSD for the tire but a 13mm internal rim width. the handling, especially when cornering, would be at best "squirrely". and could theoretically come off the rim (although i have never had this happen to me or seen or directly heard a story from someone who has had this occur to them.