Summer is the season for festivals. Of course, there are many ones held in other seasons. However, hearing "festival," most of Japanese people must think of Yukata and fireworks.
The origin of Japanese summer festivals is the Gion Festival held in Yasaka Shrine, Kyoto. Gion was the old name of Yasaka Shrine. They used to hold a festival praying for their peace and health. In 970, it became a regular event held once a year, which started the tradition of the Gion Festival.
In old times of Japan, with the festival, they prayed that pestilences would go away. They worshiped with dancing and playing music. There are little entertainment in usual streets at the time. So people gathered into the festival for enjoyment. That enthusiasm spread all over Japan and festivals got to be held in summertime here and there. That is reason why the origin of summer festivals is the Gion Festival.
How is lately it going in the Gion Festival? July 1st, a child wearing make-up cuts a straw festoon at Shijo Street for the beginning. Then, during about a month, they hold many festivals like Saki Matsuri and Hanagasa Parade.
"Hanagasa Parade" on July 24
It finishes off with the Nakoshi Sai held at Eki Shrine in the Yasaka Shrine on July 31. The worshipers go through a large ring at the guard frame and are given a charm.
I desire you to visit and stay in Kyoto for about a month in order to enjoy all the events as much as possible. As mentioned above, the festival was basically begun for their prayer. So above all, you must check patrol of a portable shrine worshiping Susano-o (also called Gozu Ten-no) who guards you from something evil if you deified rightly.