The "correct" translation is not good English. "Weekend" needs an article in front of it and a weekend is more than one day!
I wrote "tegnap előtt" in place of "tegnapelőtt". Could someone explain me? Is there a rule for it?
The rule is that tegnapelőtt, and conversely holnapután, is one word. Just like, let's see... 'wristwatch' in English.
Articles are used differently in various languages, You have to pretty much read enough to learn when it shows up and when it doesn't. Sometimes there isn't a clear rule, and you just have to get a feel for it.
"The weekend was the day before yesterday." Is there something about the word order that makes this invalid?
Well, you could also say "A hétvége tegnapelőtt volt." Says basically the same, but has a different point of view, either focusing on when the weekend was, or realising what the day before yesterday was.
It's bad that English has no modern special word for "the day before yesterday". Most of languages have it. Although there is an obsolete word "ereyesterday. "