The patent is titled Advertising based on environmental conditions. It's quite simple, per the very short abstract:
Information about an environmental condition of a remote device is received, the environmental condition being determined based on a signal output from a sensor of the remote device or a sensor coupled to the remote device. An advertisement is identified based on the environmental condition, and the advertisement is provided to the remote device.
So, in theory, if it's raining, you might get ads for raincoats. This is already done to some extent on weather webites. High allergy day in your area? And ad for Claritin appears! It's also possible to sense background noise - say that of a concert - and based ads on that. The patent was applied for in 2008 and granted on March 20.
The privacy folks are concerned of course and there are the requisite comparisons to Minority Report. Google for its part notes it patents all kinds of ideas; some never are implemented in products.