Young Frankenstein was written by comic geniuses Gene Wilder and Mel Brooks (with mad props to Mary Shelley for writing the original Frankenstein). Wilder got the idea for the film while working with Brooks on Blazing Saddles, and it was released within the year.
Legendary comic writer/director Mel Brooks (born Melvin Kaminsky in 1926) is a member of an elite group called the EGOTs—the twelve people on the planet who've won Emmy, Grammy, Oscar, and Tony awards (not to mention being a 2009 Kennedy Center honoree). Brooks first honed his comedy chops as a stand-up comic in the "Borscht Belt," the clubs and resorts in the Catskills in upstate New York that are popular with Jewish families looking to escape the unbearable summer heat of New York City.
In 1950, his friend and fellow insane clown Sid Caesar recruited him, along with other future comedy legends like Neil Simon and Carl Reiner, to write for one of the earliest variety show hits on the newfangled medium of television. Caesar's "Your Show of Shows" was filmed weekly in front of a live audience; Brooks' experience with guest star Errol Flynn was the inspiration for the film My Favorite Year, about a TV writer's encounter with a swashbuckling (and drunk) movie star who freaks out when he realizes the show is filmed live. Mel was also the inspiration for Morey Amsterdam's character on the long-running "Dick Van Dyke Show." The guy made an impression.
Brooks' Hollywood debut came in 1968 with The Producers. "Debut" is probably too understated a word. Maybe "big splash" or "bombshell" is more like it. Who other than Mel Brooks would have written a satirical film about a musical comedy about Adolf Hitler? With the title song "Springtime for Hitler?" And one that won the Oscar for best writing? Not too shabby for a first film. Brooks went on to write blockbuster hits like Blazing Saddles, Young Frankenstein, and Spaceballs (well, they can't all be blockbusters.)
The common thread running through Brooks' films is a score of eleven on the zaniness meter—crazy send-ups, corny jokes, nonstop sight gags, bawdy humor, and general off-the-wall-ness. Brooks thought that Young Frankenstein was his best film—not his funniest, but best—because he had to stick to the basic structure of the original Frankenstein story, which kept his insanity in check to a certain extent.
Writer and actor Gene Wilder was a frequent collaborator with Brooks. You probably know Wilder best as the less creepy version of Willy Wonka in Willy Wonka & the Chocolate Factory (1971) or as the optimistic prison inmate in Stir Crazy begging to stay in solitary for one more week because "I was just getting onto myself!!"
Brooks and Wilder worked together on The Producers and Blazing Saddles (1974) which did for Westerns what the two would then do for classic horror flicks in Young Frankenstein, i.e. parody the heck out of it. Wilder came up with the idea for Young Frankenstein while filming Saddles, and both movies came out the same year.
The film was conceived as yet another Frankenstein sequel, but one in which a descendant of Victor Frankenstein "wanted nothing to do with the family whatsoever" (source) .
And just like that, a classic was born.
Some of Wilder's other screenwriting credits include The Woman in Red and The Adventures of Sherlock Holmes' Smarter Brother (source).