This still strikes me as odd, even after 12 years in the US. Being out of luck is a bad thing, but lucked out is a good thing, e.g. we 'lucked out' and were able to get two extra tickets for the show. Any idea why?
It means that you are replete with luck. Think of similar phrases like 'all decked out', e.g.
Out in all these contexts means 'the fullest extent or amount'.
In fact it means the same in 'out of luck', meaning you have absolutely no luck (no luck to the fullest extent). It's just the phrase is understood differently.
out of luck - luck has run out; is gone, depleted
lucked out - escaped/got out of a potentially bad situation, or emerged/came out ahead, thanks only to luck