The best time to experience a festival in Japan is in from spring to fall. The best ones are in the summer, although many are technically in the spring or fall because their origins coincide with harvests or the opening and closing of fishing season.
The most interesting and common matsuri are bon-odori (festival dancing) and ones in which mikoshi (portable shrines) are carried through a town. The bon-odori festivals are in the summer months, throughout Japan, with events held locally nearly every weekend from mid-July through to the end of August.
The mikoshi-carrying matsuri are also held throughout Japan, but there are various customs that must be followed to participate. For most, to carry a mikoshi, one must have a hanten, a type of short cotton coat that has the emblem of a neighborhood association, mikoshi carrying team, or group affiliated with a shrine. Sometimes these are lent out by companies or groups associated with a festival to individuals who wish to participate. For some of the bigger events, they are almost impossible to obtain without strong connections, because they are in such high demand.
To find out about local festivals, a travel agent, magazine, or even a hotel should be able to find out for you. If you see a street decorated with paper lanterns, especially in a huge bank or wall covered with had written Japanese characters on them, it is a good sign that a festival is going to be held soon. Inquire at a shop in the area - a chain store like a Starbucks or Seven Eleven is less likely to know than a local shop - and you are likely to find out not only when it is going to be held, but also how to participate.
Have fun! Festival time is perhaps the best time to see Japan!