It depends on what you're asking. If you're asking how things are categorized on our map, then I would say the answer is that "we" make that determination as a group, although I guess it is ultimately my call since I maintain the map. The criteria are in the thread following the permit map.
If you're asking how it is decided at a local level then there are actually several different answers. In some counties, the issue is effectively decided by the county legislature. Normally the story here is that the county legislature will adopt a resolution indicating that licenses should generally be restricted to sporting purposes. This is what happened in Suffolk and Putnam Counties. For the most part, the county government goes along with this decision.
Of course, it's ultimately the judge's call. So, when a good judge took over in Putnam County, it went back to being a "green" jurisdiction, county legislature notiwthstanding.
In a lot of other counties, there is no county policy and it's up to the county judges. In some of these counties (especially the "green" counties) there are unwritten understandings about how licenses will be issued. (E.g. "issue full carry licenses to qualified applicants or you will be voted out in the next election") In other counties, your chance of getting restrictions placed on your license -- or alternatively, removed from it -- depend largely on what judge you draw.
In NYC, Nassau and Suffolk County the police commisioner is in charge of the pistol license. The Police commisioner goes by what the county executive says which is restrict all licenses if possible. In NYC the mayor tells the PC what to do. The Suffolk Sheriff in the eastern towns issues the license. In all other couties of NY the judge decides.