Let's try it this way:
First, just like the other guys said: in the expression itself the adverb is "плохо" ("badly"), and the "из рук вон" is the amplifier. Another adverb used here is "слабо" ("weakly", in the sense of quality).
Also the expression might be used in the reduced form: "из рук вон", implying the mentioned adverbs.
Altogether the expression conveys the sense of deepest disapproval or lowest quality and is used with verbs denoting state, action, activity.
How the expression came to be? Without digging in the books and seeing as it uses the hand metaphor, it's very likely, just like @AlexVB suggested, that originally it meant the quality of something made by person who "can't hit a nail straight or keep a tool in a hand".
Compare "все из рук валится" -- literally "everything falling out of one's hands", "can't do anything right/can't make busy with anything, because of feeling very bad or low", and rude "(чьи-то) руки (растут) из ж*" -- "(someone's) hands (growing) out of one's arse"), the person is all left hands and thumbs, can't do/make anything right.