Translation:The day before yesterday or the day after tomorrow?
They are standalone words. If you use the parts separately as in tegnap előtt, that means ‘before yesterday’. If you say tegnapelőtt, that means ‘the day before yesterday’. The same is true for holnap után vs. holnapután where the former means ‘after tomorrow’ and the latter means ‘the day after tomorrow’.
Because English and Hungarian are different languages :)
The words in Hungarian work (grammatically) similarly to "tomorrow" and "yesterday" in English, which do not need an article, either.
For whatever reason, English has no single word for the "the day after tomorrow" and "the day before yesterday" and needs to use a phrase; this phrase then includes "the". We always say "I will come the day after tomorrow" and not "I will come day after tomorrow".
So English needs the "the" because this is the way English phrases those days.
Hungarian does not need "the" (or the Hungarian equivalent a) because Hungarian does not use such a phrase -- they have a single-word adverb instead.
In some parts of the southern US, we actually do (sometimes) drop the "the" and just say "day after tommorow" or "day before yesterday." Especially at the start of sentences: "Day before yesterday, i was struggling with Hungarian, and day after tomorrow i will be too."
I know it isn't correct english (very little of southern vernacular is) but its worth pointing out.
"The" is kind of implied when there is only one of whatever you are talking about. Saying "a day before yesterday" doesn't make sense - it implies there is at least one other "day before yesterday." When there is only one, it is automatically "the [noun]."
Similarly, you would never say "a state of california," "a statue of liberty", "a mona lisa", of "a country of england." There is only one of any of those things so they can only be THE state of California, THE Statue of Liberty, THE Mona Lisa, or THE country of England.
While your answer should also be accepted, there are always going to be times where you have to imply words when translating between languages, because things rarely translate perfectly and exactly.