Adventure Time is a great kids show, in fact I'd say it's one of the best I've seen in a long time (along with Gravity Falls of course), but it's weird to think that the show has this really dark history, and in fact when you analyse the show itself and its themes and subtext, it's a real surprise how Cartoon Network let this show run at all!
What caused the Mushroom War?
That's one of the things that we don't really know: What exactly caused it, but the name of the war does suggest that Nuclear Warfare was involved, because there is a few images of nuclear bombs not gone off in the title sequence of the show, if you don't know what I mean, re-watch the very first opening bit and you'll understand.
Well, what ENDED the War then?
Well obviously, the Mushroom Bomb that got dropped along with all the other nuclear weapons wiped out pretty much all of humanity, and this was about 1000 years before Adventure Time, and we know this because Marceline says she's over 1000 years old, and she stuck with Simon Petrikov (Ice King) in the days after the Mushroom War.
WAIT, WHAT? Ice King and Marceline?!
Yeah! In the episode "I Remember You" we learn about Marceline's past with the Ice King (Simon Petrikov) and how he protected her, at the cost of his own sanity by using the crown that turned him into the Ice King. Sadly, Ice King doesn't remember any of this as him having any memories of his human self are gone due to the crown.
So what happened after the Mushroom War?
Well basically, almost everything of human civilisation was destroyed or damaged beyond repair! There are large amounts of human technology scattered all over the Earth too, and in fact they do some of it in the show such as the Projector from the Couples Only Movie Night! But there were some that survived like Marceline, Simon Petrikov, obviously the family line that led to Finn, as well as Moe the creator of the -MOs (B-MO etc.)
So what does the Mushroom War have to do with Adventure Time now?
A LOT. For starters, Princess Bubblegum wouldn't be around if it weren't for the Mushroom War! There was this weird gum in the episode "Simon and Marcy" which helped the two, and protected them as well as getting food for Marceline. In the final scene of the Adventure Time game Explore The Dungeon Because I Don't Know! It was shown she emerged from the gum and began sentient.
So second of all, no Princess Bubblegum = no Candy Kingdom! That's right, if there was no PB there'd be no Candy Kingdom, considering she basically built it up from scratch over thousands of years, which actually kind of makes PB and Marceline the same age...
It's also worth mentioning that in the episode "The Vault" Princess Bubblegum asks Shoko (Finn's previous incarnation) to cover up an irradiated river, which could hint that the Candy Kingdom is actually built on top of a pond of nuclear waste!
Well, have they actually referenced the War directly in the show?
Sort of. In the Season 5 two-part opener, Finn The Human, and Jake The Dog, Finn is transported to this alternative reality after Finn and Jake chase The Lich through a dimensional portal where they meet this guy called Prismo, and they discover that The Lich had wished for the death of all life, so Finn wishes the Lich had never existed.
In this alternate reality, Finn has a family, with Jake as well (but he's a normal dog, no speaking or powers). He also has a robot arm, it's a bit odd. Anyway, in this reality, Finn and Jake fall through an opening in the ground and find Simon Petrikov (Ice King) except he's dead. Then we see a very odd Marceline come out, who had stayed half-demon in this timeline, explain that Simon had given his life to freeze the "mutagenic" bomb that would have caused all the events in the normal Adventure Time timeline. This is about as close as you will get to a direct reference on the War.