It depends.
That's the short answer.
The long answer would take more time than I have in this world to fully explain. But even if I could put words to it, you would be better off doing your own listening and then decide for yourself.
The medium length answer is that for moderate budgets, headphones can take you a lot further than speakers can, assuming that you can suspend your imagination a bit in terms of the soundstage issues which are quite problematic for headphone systems.
There are too many factors at play with speaker systems to truly get audiophile sound quality on an extremely low budget (most notably the room issues that cannot be dealt with so easily). Headphones take the room out of the equation and thus can deliver crystal clear music which comparably priced speakers cannot touch. But this is because of faliures in the delivery system, not faliures in the speakers themselves. Yet, at the same time, even moderately priced speaker systems will give you certain things that even the best headphone systems cannot.
So depending on what you value most in your listening sessions, a solid argument could be made for either headphones (details, intimacy, clarity) or speakers (soundstage, realism, sense of venue) as being "better" within nearly any budget.
But at the extreme end budget-wise, headphones just can't match up, IMO. Assuming that you're willing to spend "any" amount for your own paticular "ideal" headphones system and speaker system such that you'll have the best of both worlds. If you're like me, you'll want to listen to your speaker system 80% of the time, no matter what headphone alternatives you might have at your disposal.
This shouldn't come as any surprise. You could make the same kind of coomparisons between full size headphones and IEMs. There would be all sorts of good arguments for IEMs (convenience, portability, and even the intimacy of the sound signature since the drivers are in your ear canals and thus more immediate). But when you compare an extreme IEM system to an extreme full size headphone system, the hedphones will win because they have a better delivery mechanism. Likewise, an extreme speaker system will be better than an extreme headphone system for the same reason, only the differences will be even more pronounced.
But to get there, your speaker system has to be good enough to be able to match the best headphone systems available in terms of details, intimacy, and clarity, and that is a TALL order, especially when considering the room issues which are often hard to deal with. Yet, once your speaker system gets to that level, it is no longer a fair fight; headphones cannot keep up because of their inherent limitaitons (soundstage, realism, sense of venue) no matter how well they do everything else.
More realistically, you probably won't be able to get your speaker system to that same level of details, intimacy and clarity that your headphones can offer you, so then you're back to the trade off and having to decide which things are more important to you.
My overall take on it is that as the budget decreases, headphones tend to offer a better bang for the buck and as the budget increases speakers tend to win more hearts.