A typical food item has to be shipped over 1200 miles before it makes it to your dinner table. But buying food from locally owned grocery stores that rely on local farmers cuts transportation costs quite a bit.
Also, locally produce food doesn't have to be refrigerated as much on the trip. So goods that are produced, packaged and sold locally means less energy consumption and less pollution. It also preserves trees that will not have to be cut down to build roads, warehouses, and heavy packaging materials.
Local businesses are also often more invested in saving the local ecology because they have to live in the same area that their businesses impact.