Urbanization can alter the organization of ant communities and affect populations of urban pest ants. In this study, we sampled ant communities in urban and suburban yards to understand the habitat factors that shape these communities and influence the abundance of a common pest species, Tapinoma sessile (Say). We used pitfall traps to sample ant communities and a combination of pitfall traps and baiting to collect T. sessile at 24 sites in Knoxville, TN. In total, we collected 46 ant species. Ant species richness ranged from seven to 24 species per yard. Ant species richness tended to be lowest near houses, whereas T. sessile abundance was highest near houses. The best predictors of ant species richness in yards were canopy cover and presence of leaf litter: ant species richness peaked at mid-levels of canopy cover and was negatively correlated with the presence of leaf litter. Tapinoma sessile abundance increased with presence of logs, boards, or landscaping timbers and leaf litter in yards. Our results indicate that ant communities and the abundance of particular pest species in these urban and suburban landscapes are shaped by many of the same factors that structure ant communities in less anthropogenically disturbed environments.