When the AR was first produced, it came with a 14" twist, probably because that was common in .22 centrefire calibers in sporting use.
Tests showed the 14" did not produce adequate stability with the 55 FMJ bullet being produced for military use, so it was tightened to 12" after about 30 000 AR-15s were produced.
When NATO adopted the 5.56mm cartridge, heavier bullets were introduced. The 12" twist would not stabilize the long 4g FMJ bullet or the even longer tracer. Colt did tests and found that a 9" twist stabilized the FMJ, but it took a 7" twist to stabilize the tracer. They also found that the 7" twist was prone to excessive wear, so they recommended the US military use a 9" twist for general purpose use. But, the military wanted all rifles to be able to use tracer, so they went with the 7" twist rate. To maximize barrel life, most barrel makers went with the 9" twist for the commercial market.
Now, a number of extra-long, super heavy, high-performance bullets are being made to try to get the most lethality out of the 5.56 cartridge. The 9" twist won't stabilize some of these, so 7" is becoming more and more popular in the commercial market, too. Some match barrel makers are making an 8" twist rate as a compromise between the two.
The wear problems Colt found with the 7" twist don't seem to be a problem in the real world, and the 7" twist will stabilize everything, so it is probably the best choice, unless you are 100% certain you will never shoot anything heavier than 62 grains.