Young Frankenstein is a parody of monster movies, specifically (this should be obvious) the Frankenstein films of the 1930s starring Boris Karloff. Ironically, by parodying monster movies, Young Frankenstein is itself a monster movie. It has to become one in order to spoof it. As a result, it uses many of the now-hokey cinematic tropes of these classic horror flicks—a dark and stormy night, crashing lightning, flickering, creaky machinery, skeletons, graveyards, eerie music, and brains in jars.
Of course, Young Frankenstein is all done tongue-in-cheek, making us look at these tricks as tropes, meaning that we'll never see them the same way again, even in films that play them for scares instead of laughs.