The federal government enjoys the positive externality of an overall more intelligent and skilled populace by having more lax immigration policies towards non-citizens that have advanced degrees or special skills - enabling a brain drain (undoubtedly a negative externality) to be suffered by other countries that in some sense supplied that skilled person to the labor market. See Immigration and Nationality Act.
Laws enacted by states that uniquely benefit their own citizens, while diverting negative externalities to other states are struck down. See Kassel v. Consolidated Freightways Corp.
Some municipalities, in order to prevent the negative externality of concentrated poverty due to clustered affordable housing communities, are required to provide an amount of affordable housing proportionate to the need of their community. See NAACP v. Township of Mount Laurel.
Fiscal federalism provides an overview of the externalities put on the different levels of government, as well as individuals, through government budgeting. The priorities that one level of government adopts and actualizes will result in another level sitting back, holding off on those same priorities - enjoying the benefits without taking on the costs. This works the best, however, when the level actualizing the priority (usually through money) is the more inclusive level (federal as opposed to state, county as opposed to city). This provides some logic to the U.S system that provides the bulk of tax revenue to the federal government, allowing those funds to generate externalities that benefit local governments.
See also Rethinking Fiscal Federalism.