Usually associated with trying to break a bad habit, vice, flaw, failing or weakness… and failing. For example, trying to lose weight, stop drinking, quit smoking, etc. One would fall off of said wagon by going back to their old ways. Such as getting a double whopper with cheese, going on an all night bender, or chain smoking unfiltered Marlboros.
You can fall off the wagon hard, get bumped, bruised, and run over by the wagon. Some people on their way to the ground turn around and destroy the wagon.
Some have said that the expression comes from Ethan Allen who went into New York to party and came back drunk, fell off his wagon and then was either killed, or froze to death in the middle of winter.