This study examined the effects of environmental factors on the abundance of black pine bast scale (BPBS), Matsucoccus thunbergianae Miller and Park, in coastal disaster prevention forest stands composed mostly of Japanese black pine. Geographical factors, soil conditions and forest stand conditions were measured to evaluate the hazard rating for the occurrence of BPBS from 35 plots in the coastal forest stands. To assess the hazard rating, a combination of a self-organizing map (SOM), which classified the samples according to their characteristics, and a random forest model, which predicted the probability of the occurrence of BPBS from SOM results, was used in this study. Our results showed that major factors determining the abundance of BPBS were climate, tree size, and tree health. BPBS was more common in low latitude coastal forests, suggesting that warmer conditions were favorable to BPBS population buildup. Tree size also influenced the abundance of BPBS, which was higher in forests composed of larger trees (greater DBH). Finally, BPBS was also more abundant in areas with high soil salinity and clay-loam soil, and north-facing slopes where tree vigor was lower.