The festival finds its religious justification in the Ullambana Sutra (probably not an original Indian sutra but written in China). This popular sutra exposes how the Lord Buddha instructs his disciple Mokuren (Maudgalyayana in Sanskrit, Mulian in Chinese) how he can release his deceased mother from her low rebirth as a hungry ghost by making annual food offerings to the community of monks on the 15th day of the 7th month.
The sutra propagates filial piety, which is typically Chinese and Confucian rather than Buddhist (the Buddha after all left both his parents and his wife behind when he set off to achieve Enlightenment). The influential sutra gave rise to the East-Asian practice of honoring the souls of the ancestors in a Buddhist summer festival.
"Bon" is a shortened form of Urabonne (Ulambanna in Sanskrit), which means something like "suffering in Hell." The festival's original purpose was to ameliorate the sufferenings of the ancestors in that fiery place and assure them of a better rebirth - note that the Buddhist hell is rather a form of Purgatory, as it is only temporary. Nowadays, Obon is more seen as a family reunion, both of the living members (who return to their hometowns) and the dead ones, who are wlecomed back to their former homes.
The Bon festival is celebrated all over japan from 13 to 16 August (although some regions keep to the traditional date one month earlier), so that it coincides with the summer holidays. Small bonfires are lit (or lanterns - Obon used to be called the Lantern Festival) to show the way home to the ghosts, who are regaled with fruits, sweets, cakes, vegetables and flowers. The house is cleaned and offerings are set out on the Buddhist family altar (butsudan).
[Bon Market near Rokuharamitsuji, Kyoto]
Near Rokuharamitsuji Temple in Kyoto, a special Bon market is held. On the last evening of Obon, the ancestors are sent off again by another bon fire (okuri-bi) and paper lanterns are floated in rivers (toro nagashi - it is a beautiful sight to see the small lights float down the stream), or set up in graveyards, to guide the souls back to the other world.
The huge bonfires of Daimonji in Kyoto and other cities serve the same purpose. During the festival, many neigborhoods in Japan are covered in the smoke of incense. On the flip side, trains, plains and highways are packed and jammed because of all the people traveling at this time.
By the way, Mokuren of course succeeded in releasing his mother from her status as "hungry ghost" and therefore danced for joy. This is the "folklore" origin of the Bon dance, which is an expression of gratitude to one's ancestors and the sacrifices they made. Qua broader style the Bon dance is based on nembutsu dances but there are different varieties all over Japan. Usually a yagura, a dance platform, is set up. The dancers wear yukata and slowly dance in a circle. The most famous example of Bon Odori is the Awa Odori festival of Tokushima, where a long line of participants dances through the streets of the city.