From FAA Publication
7350.7Y LOCATION IDENTIFIERS Effective 11/23/06 (emphases added):
1-2-7 Assignment System
a. Three-letter identifiers are assigned as radio call signs to aeronautical navigation aids; to airports with a manned air traffic control facility or navigational aid within airport boundary; to airports that receive scheduled route air carrier or military airlift service, and to airports designated by the U.S. Customs Service as Airports of Entry. Some of these identifiers are assigned to certain aviation weather reporting stations.
[...]
c. Most one-number, two-letter identifiers have been assigned to aviation weather reporting and observation stations and special-use locations. Some of these identifiers may be assigned to public-use landing facilities within the United States and its jurisdictions, which do not meet the requirements for identifiers in the three-letter series. In this identifier series, the number is always in the first position of the three-character combination.
d. Most one-letter, two-number identifiers are assigned to public-use landing facilities within the United States and its jurisdictions, which do not meet the requirements for identifiers in the three-letter series. Some of these identifiers are also assigned to aviation weather reporting stations.
1. One-letter, two-number identifiers are keyed by the alphabetical letter. The letter may appear in the first, middle or last position in the combination of three characters. When the letter signifies an Air Traffic Control Center's area, the assignment will not change if the Center's boundaries are realigned.
2. Identifiers in this series, which could conflict with the ''Victor'',''Jet'' or colored airway numbers are not assigned.
e. Two-letter, two-number identifiers are assigned to private-use landing facilities in the United States and its jurisdictions which do not meet the requirements for three-character assignments. They are keyed by the two-letter Post Office or supplemental abbreviation (listed below) of the state with which they are associated. The two letter code appears in the first two, middle, or last two positions of the four character code.
[...]
1-4-1 Use of Location Identifiers
An international location indicator is a four-letter code used in international telecommunications. The location indicator for airports in the contiguous United States is the three-letter identifier preceded by "K". For other non-contiguous United States airports, the following two letter prefix will be used:
Alaska - PA, PF, PO, PP
Hawaii - PH
Puerto Rico - TJ
Virgin Islands - TI
(See ICAO Document 7910 for listings.)
The above "official" word notwithstanding, there are doubtless some exceptions and anomalies.
Here's an interesting article with some of the historical background:
http://www.skygod.com/asstd/abc.html