Oil wells typically produce both oil and natural gas. While there are multiple ways that oil can be moved from a well to a location where it can be processed -- pipelines, rail car, or tank truck, either individually or in combination -- the only practical way to move the natural gas if you want to process it for commercial sale is by pipeline. There are sometimes other local uses for it, such as reinjection into the oil reservoir to help maintain pressure. If a pipeline is lacking, though, the easiest way to dispose of the gas is by flaring -- separate it from the oil and burn it in a more-or-less controlled fashion.
For a considerable time, flaring was relatively uncommon in the US. The natural gas was valuable, the number of new wells was moderate, and it wasn't that expensive and/or time consuming to extend gas pipelines. The recent rapid development of shale oil has changed that. Gas flaring is becoming much more common. So much so, in fact, that the flaring in two areas is visible from space at night. The image below is a composite night time image assembled by NASA. While the urban areas that are traditional in such images are still clearly visible, gas flaring from two major shale oil developments is also visible.
Flaring from Bakken shale production in North Dakota and Montana is a roughly circular blob. Flaring from the Eagle Ford shale in Texas is a long arc. There are a number of reasons that flaring is being used to dispose of the gas in these areas. Production of shale oil involves a large number of wells, so the collection pipeline networks will be large and complex. Wellhead natural gas prices in the US are currently very low, making it more difficult to recover the costs of those collection networks. The Bakken field is quite distant from large-scale gas processing facilities, adding to the expense. And in the case of the Eagle Ford field, much of the gas contains significant amounts of hydrogen sulfide, a toxic gas that has to be removed and disposed of if the gas is to be used commercially . Combined with low prices, it is quite possible that Eagle Ford oil producers would have to pay someone to take the gas.
While the Bakken is quite isolated, the Eagle Ford activity is occurring relatively close to the city of San Antonio (indicated on the map). Concerns have been raised that combustion products from the Eagle Ford flaring will add enough to San Antonio's local air pollution to put the city in violation of federal standards for ozone. In the meantime, Bakken flaring is estimated to burn about 100 million cubic feet of natural gas per day, roughly the demand for gas from a city of 500,000. Or, expressed in more local terms, enough to meet the needs of 70% of the population of North Dakota.
I understand that the oil companies that hold leases in the Bakken and Eagle Ford areas are under pressure to produce oil in order to generate cash flow to cover their costs. But at a larger level, do "we" need that particular oil so desperately that we should waste that much natural gas? Or to burn it so carelessly that we run up the air pollution levels in nearby cities?
 Flaring converts the hydrogen sulfide into less toxic compounds.