Its an 18th century contraction (or rather alteration ) of the 16th century term snippersnapper. Which is very unhelpful as the etymology of snippersnapper is doubtful.
I veer towards the opinion that it is by refernece to saplings....young trees that are flexible and whip or snap in the breeze....
Whippersnappers were first known as "whip snappers" (in the 17th century, I believe); this came from their habit of standing around street corners all day, snapping whips to pass the time. The term was based on "snipper-snapper," which already existed, but in any case, "whip snapper" very quickly became "whippersnapper".