Ethylene
Bananas ripen under the influence of a gas called ethylene. Ethylene is actually a hormone naturally produced by most fruits, bananas included. Bananas are picked from their palms while very underripe so they don't spoil during shipment. Before being set out for sale in grocery stores, bananas are gassed with high doses of ethylene to speed the ripening process.
Bananas That Miss the Ethylene Treatment
Because bananas are stacked in boxes in rooms containing perhaps hundreds of boxes and thousands of bananas when they are gassed with ethylene, not all bananas receive equal doses. Bananas that are tucked away in a corner, blocked by other boxes of bananas, far from the entry point of the ethylene may receive very little, if any, of the ripening agent. Those bananas will be placed on the shelf just like the others, but will fail to ripen quickly after purchase.
Speeding the Ripening Process
Even a bunch of bananas that missed the high dose of ethylene prepurchase is still producing its own natural ethylene. If you feel your bananas are taking too long to ripen, place them in a brown paper bag. The bag will serve as a collection device and gas chamber, keeping the ethylene produced by the bananas enclosed with the bunch. For even speedier ripening, place an apple in the bag as well --- apples also release ethylene.
Patience
Left to their own devices, bananas will ripen in time. If you want to wait a week or two, your slowly ripening bananas will lose their green color and soften up until they're just how you like them.