From the Oxford English Dictionary: [behind a paywall]
Used predicatively: in a more favourable or advantageous position; esp. better provided with money or other resources. Cf. well off adv.
Frequency (in current use):
Origin: Formed within English, by conversion. Etymon: of prep.
And finally from that entry, also relevant here:
I. General uses.
Off has been used since the Middle English period with many verbs, e.g. buy v., come v., dash v.1, get v., go v., look v., mark v., palm v., pass v., rattle v.1, show v., take v., etc.: see the first element. In most of these the basic uses of off correspond to those given below, while (as with other phrasal verbs) the further developments take a more idiomatic turn.
I am assuming (and I could be wrong) that since it was formed from the preposition of, the original usage might have been some kind of comparative: the better of two things. And eventually came to have a meaning on its own: better off, worse off, well off.
Please note: to be better off is not the idiom: You had better [verb].