"Oh, snap!" replaces another exclamation where "Oh,...." is followed by the usual 4 letter word when something bad surprises one.
I don't know how long ago "Oh, snap" has been around, but it was an exclamation used by <Peter Skarsgaard, sp?> in the comical 2006 VW ads entitled "Unpimp My Ride." So it goes back to 2006, maybe earlier. This is the actor who fed Steve Buscemi to the wood chipper in the movie "Fargo". I always school GTI drivers I talk to about this series. Most have not heard of it since it's now getting to be 13 years old.
https://www.youtube.com/watch?v=e1MNEqCr748
SIA