Unfortunately, you don't. you just have to learn the grammatical gender for each word. I remember reading somewhere that about 70-80% of words use "en", so if in doubt, go with that and just try to remember all the "et"-words over time :)
Copying myself here:
It depends on the grammatical gender of the word. "common gender" uses en, "neuter gender" uses et. Sadly, there is no system as to which words are what gender. It's something you have to memorize.