School Festival

Bunkasai, the "Japanese Cultural Festival," is an important annual event at nearly every school in Japan from junior high to university (the dates are different from school to school, to allow observers to attend multiple events). It's a day to show off the students' talents and the school itself to parents and prospective students. Instead of a shrine-based matsuri, a Festival Episode may well be based at a school's Bunkasai.

Each homeroom class will put on some sort of event (justified from the educational standpoint as teaching the students how to run a business); the two most common involve turning a classroom either into a small cafe (kissaten), or a Haunted House (obakeyashiki, from Obake, meaning monster or ghost, and yashiki, mansion). This itself has become such an ingrained part of the trope that it is rare to see any other possibilities discussed when a class is trying to decide what to do for their participation in the festival (this is lampshaded in Azumanga Daioh), but carnival games and student-crafts shops crop up from time to time. Student clubs will also participate, generally creating club-theme-related attractions in hopes of attracting future recruits. Theme costumes will be commonplace.

In addition to events held within the school proper, with classrooms temporarily transformed into shops, the school grounds will be used for outdoor stalls like those of a shrine matsuri.

It's highly likely that any manga or anime set primarily in a school will have a Bunkasai episode or even arc. The wackier the story and the larger the campus, the more elaborate and strange the festival will be...

May involve a School Play.

Anime and Manga

 * Azumanga Daioh had a cafe for one festival, and a small shop selling stuffed animals for a different school festival. Each year, the same students made the same suggestions at first, one suggesting "A haunted house", another "A cafe", with Chiyo noticing this. It also subverted the normal obakeyashki/kissaten pattern, where one year Osaka suggested an obakeyashki kissaten, or "haunted cafe"; when that didn't fly, she suggested a "haunted cute animal cafe" - "It's full of adorable dogs and cats... and they're all dead." They ended up taking the cute stuffed animal theme of the first and combining it with a cafe.
 * An example of an obakeyashiki can be found in the school festival episode of Mahoraba.
 * Touno Junna's class in W Wish runs an obakeyashiki.
 * Awkward Silence has an arc where one of the protagonists ends up on the culture festival committe because he was Asleep in Class and too shy to say no. Organizing it completely exhausts him. His boyfriend's class runs a Maid Cafe (the other old favourite, the Haunted House, was suggested but rejected on the grounds that they did it last year).
 * The feature-length Urusei Yatsura film Beautiful Dreamer is centered, in an odd and surreal way, around one such school festival. Megane insists on turning their class into a World War II Nazi coffee shop, Mendo supplies a panzer for added authenticity, and things only get weirder (albeit more tasteful) from there.
 * Miki's class in Marmalade Boy runs a kissaten at their School Festival.
 * So does Ranma ½'s.
 * The Yamayurikai at Lillian Jogakuen in Mariasama ga Miteru puts on a performance of Cinderella at their School Festival, which becomes a major plot point.
 * Festival time rolls around again in Season 4. This time they do Torikaebaya Monogatari, mostly at Sachiko's insistence so she doesn't have to play the lead. Touko having the split her time between the Yamayurikai's play and the Drama Club's production of Little Women is also a source of drama in the lead up. Yumi and Yoshino's class are quite laid back in comparison, simply doing a food stall.
 * The first episode of Suzumiya Haruhi shows the video the SOS-Dan created for the School Festival, which is shown in episode 12. Yuki's class does fortune-telling (with Yuki being amusingly exact), and Mikuru's class did a yakisoba cafe, while Kyon and Haruhi's class "copped out and did a survey" and Itsuki's class performed a play (Rosencrantz and Guildenstern Are Dead). The second season arc "The Sigh of Haruhi Suzumiya" shows the leadup to the festival.
 * Mahou Sensei Negima takes the trope and runs with it. A city-sized school having a festival somewhere in size and scope between Disneyland and Mardi Gras, complete with airship rides, a fighting tournament, holographic amusements, a everything from costumes to Humongous Mecha, beauty contests, concerts, plays, and the usual student-run cafes and haunted houses. Negi's class does a haunted house of their own, which is helped by the fact that one of their classmates just happens to be a ghost. It also happens to be one of the largest arcs in the series, with half the manga by the time it concluded either leading up to or taking place during it. The whole affair is capped off with a small war.
 * They also have a 1:1 scale replica of l'arc de triomphe and a fleet of zeppelins with large TVs on the side.
 * Kaitou Saint Tail has to steal something during a School Festival that involves costumes... so she puts up an illusion that every girl in school is dressed just like her to keep her detective pursuer running.
 * The festival in School Days forms a major plot point, since the dance around the bonfire is used for couples to declare their love. Of course, the "lounge" at the haunted house helps some too.
 * There was also some amusement to be had by the fact that one class actually did do a "haunted cafe", staffed by zombie cosplayers.
 * Persona 4: The Animation has this in episode 19, complete with a cheesy play, beauty pageant, cross-dressing pageant and a "Group Date Cafe."
 * Manabi Straight! revolves almost entirely around the actions of the Absurdly Powerful Student Council, headed by the titular Manabi, to save their school festival and keep the spirit of Seioh alive. They by and far succeed.
 * Lucky Star had its final episode end at the cultural festival. Aside from their own classes things, all the main characters ended up doing a cheerleading dance that would have been suspiciously familiar to anybody who had been watching the anime...
 * By the way, at that episode Konata got her class to do fortune-telling (see Suzumiya Haruhi example, above) and in Yutaka's class, Hiyori used it as an opportunity to get Minami to wear something masculine...
 * Inuyasha featured a two-part School Festival episode centering on the bunkasai held by Kagome's school. The series being what it is, several monsters show up and Kagome and Inuyasha are obliged to find and vanquish them while Kagome tries to both prevent anyone at the school from catching on and fulfill the various responsibilities her friends have roped her into. Hilarity Ensues.
 * Fruits Basket contained a School Festival episode.
 * Code Geass liked it so much, they did it twice: the first season has the annual School Festival as a whole episode, complete with a horror house and Student Council President Milly's attempt at making the world's largest pizza. R2 has one in honor of classmate/high-ranking noble Suzaku, who had just returned to the school. Both festivals have a good deal of Hilarity Ensues and Fan Service.
 * Becomes sort of annoying when you realize that it's a Britannian Academy, not a Japanese high school. The Britannians are notably racist and have taken specific measures to eradicate Japanese culture. Thus, it's mystifying why what is basically a British Boarding School retains such a traditionally Japanese trope. Tokyo Is the Center of the Universe indeed.
 * Gakuen Alice had a festival episode where Mikan's Special Abilities class had an Arabian themed maze game.The entering people had to go through stages in order to win, such as to not laugh at a boy who has an Alice that makes everything funny. Also a particularly humorous scene in which Natsume faked an injury to trick Mikan,which worked. It also had a major plot point where Ruka's crush on Mikan is revealed at the ending dance as Natsume looks on peeved. But the person to dance with Mikan in the couple's dance ends up being Hotaru!
 * In Yotsuba&!, Yotsuba visits Fuka's school festival, where her class ran a vaguely French-themed cafe that served Yotsuba not the impressively decorated cake she anticipated but plain pound cake. As Fuka's older sister Asagi cheerfully said later, "Culture festivals usually deceive children."
 * In School Rumble the students take the culture festival very seriously. When they can't choose between hosting a cafe and putting on a play, there's only one way to decide- WITH GUNS!
 * And that's only the start of the culture festival arc!
 * There is one in Nodame Cantabile, which leads to a very ... creative interpretation of Gershwin's "Rhapsody in Blue", in which Nodame plays the lead part on a melodica--while wearing a bulky mongoose costume.
 * Having an art school setting, Hidamari Sketch's bunkasai is really cultural-- students (if not cough Yoshinoya cough teachers) have to put on display their art pieces and school plays. This school festival arc was about Yuno's quest for a topic for the aforementioned art piece.
 * Great Teacher Onizuka manga ends with one being in the works.
 * The Culture festival "with minimum amount of culture possible" in Sayonara, Zetsubou-sensei, as mandated by the titular teacher himself.
 * Karin's school has one, the first one Secret Keeper Kenta's ever been to. Unfortunately, Karin's grandma shows up to make trouble.
 * In Ai Yori Aoshi, Kaoru and his fellow Photography Club members create a traditional Japanese tea room for their festival. It's very popular, thanks to Aoi's talent with such things. Kaoru's a little torn on the subject, given traditionalism's role in his Dark and Troubled Past.
 * All of Ai Yazawa's long series set in a High School involve one. In Tenshi Nanka Ja Nai, since the main characters are in the student council, they have to organize it themselves. In Gokinjo Monogatari and Paradise Kiss, it's an excuse for the aspiring fashion designer protagonists to create a Pimped-Out Dress.
 * The original Yu-Gi-Oh! manga featured a School Festival story that culminated in Yami Yugi killing a school bully with a test tube full of nitroglycerin. It was awesome.
 * To elaborate: Yugi's class had set up a carnival booth for the school but some Jerkass upper classmen demanded the space for their fried octopus stand and wrecked the booth and put their massive grill in it's place. Yami then shows up and challenges the head jerkass to air hockey on their grill using a puck of ice with the tube of nitroglecrin in it... and using his oppnents tendency to hit really big against him by splitting the puck, causing it to break and explode next time the jerkass hit it. Awesome.
 * In Change 123, some events which are important for the main plot actually took place at School Festivals - so far at least two of them.
 * Ouran High School Host Club's final two episodes involve a school festival. Of course, being Ouran, the festival is over the top--it even includes a horse drawn carriage.
 * Toradora! has a three episode arc. Ryuji's class puts on a Wrestling Show, with Taiga as the Big Bad and Ryuji as her dragon.
 * Koihime Musou's High School AU Baker's Dozen trilogy wraps up with an episode set at St. Francesca's school festival. The main characters do a cafe dressed in Shuri's outfit from the main series, and every other class gets to put on a show.
 * A major story arc in Rosario + Vampire involved Tsukune preparing for the school festival, but the festival itself was only a minor arc to wrap up the season.
 * Tenchi Academy gets a maid-themed festival. This is partly due to the Student Council President completely forgetting about the event.
 * This was a central topic of Wandering Son several times within the middle school portion of the series. While haunted houses were seen and the protagonists sister was a part of a cafe, the protagonists were always either a part of a School Play or a beauty pagent.

Video Games

 * In Persona 3, nearly a whole week (in game time) is spent setting up the plot for the Culture Festival... which is then rained out by one of the largest typhoons in years. This was a disappointment for a small segment of the fanbase, who really wanted to see Yukari in that maid costume.
 * You can! Check the security camera in the briefing room...
 * Not just the fanbase; several NPCs moan their great disappointment out loud, and the Main Character is asked if he's disappointed for the same reason.
 * Persona 4 had a festival as well. It doesn't last long and all it really does is give you brownie points with some of your social link friends. As a side note: Don't mention "Group Date Cafe" to any of them.
 * A staple event of the Tokimeki Memorial series.
 * Setting up the school festival plays a major role in Yukiko and Takahisa's stories in 11eyes -Resona Forma-. Ema's class puts on a cat ears Maid Cafe (even the boys dress up as maids), and Yukiko has the Modern Society Studies Club create a megaplex. Though in both cases, the festival is secondary to other issues that crop up.
 * Happens multiple times in Mana Khemia, which takes place over a three year period. Happens once in the sequel, which lasts only one year in universe.