Depending on the surrounding text, the meaning should become clear. (My personal impression, hearing it completely on its own, is that pretty is the adjective and egg box is the noun—but it certainly doesn't need to be interpreted that way.) I expect that if the term pretty egg box were found within several sentences, it would become obvious if it was referring to an egg box that was pretty or a box for pretty eggs.
Punctuation, as you suggest, is not necessarily wrong when it comes to grammar. However, the reception of such punctuation may be just as bad (or worse) to a reader as the ambiguity of not using it.
Although this kind of thing is open to subjective opinion, I can't quickly parse a pretty-egg box. I can understand its unambiguous meaning (because it follows rules of punctuation I'm used to), but I have to pause and consider it for a few seconds.
Perhaps a more quickly understood form of punctuation would be a "pretty egg" box. There is no hyphen being used in an odd (although correct) way, and the quotation marks serve to more easily distinguish the parts of the phrase. While this, too, is unusual—it seems more readable to me.
But I think the best option would be to let the context determine the meaning—or to simply rephrase it.