There are two books on the subject that I am aware of. The first is generally difficult to obtain;
Squadron Codes 1937-56 By Michael J.F. Bowyer and John D. R. Rawlings (Patrick Stephens,1979)
The second;
Combat Codes, by Vic Flintham and Andrew Thomas (Airlife, 2003) is a recent and generally available book.
As with anything the military, the assignment and application of codes was controlled by the appropriate headquarters. In this case the Air Ministry.
Since I assume this conversation refers to the WW II applications, the original document assigning both codes and applications was "A154 - Identification Marking on Aircraft of Operational Units and Marking of Unit Equipment" issued in April, 1939. It was supplemented by at least two issues of the Secret Document 110 (SD 110) No know examples of this latter document are known to exist.
Also, as with anything military, there are probably as many examples of misapplication of the codes as there are proper examples. When Uncle Sugar came on the scene, the code letter continued to be assigned by the British, even when applied to U. S. aircraft.
Later, when the letter/number combinations not yet assigned started getting critically low, some duplications were assigned. Generally the duplicates were in theaters of operation far apart.
Norm