Someone from another question answered a question asking why "The girl" was "Jenta" as opposed to "Jenten".
An example I pulled from reddit states: "ei jente" is a regular feminine noun. There isn't really any reason behind it, it's just the way the language is. A few more days of memorizing and it will stick! "Jeg så ei jente" - I saw a girl (not any girl in particular). "Jeg så jenta" - I saw the girl (a specific girl).
A tutorial from: http://www.learn-norwegian.net/tutorial/2/03conjugation.htm states that there are three gender forms, Masculine, Feminine, and Nueter.
The definite form of "en"(masculine) words is "en".
The definite form of "ei"(feminine) words is "a".
The definite form of "et" (neuter) words is "et".
So I think it is just a matter of recognizing which of the three gender forms a word falls into.
I am no expert but I hope this is correct and helps you!
EDIT - Swapped feminine and neuter definitions! Thanks @CHarrell13
You have feminine and neuter backwards; "ei" is the feminine definite article, and "et" is the neuter one.
In answer to the question above you, the feminine gender is formally considered optional in Bokmål, so you can use the masculine articles instead, but it is very, very common for some nouns to be feminine. This is very similar to Danish and Swedish, which do not have masculine and feminine, but instead a "common" gender combining them. Both have a neuter gender, as Norwegian does. Notably, some of the more radical standards (that is, ones that want Norwegian to be more distinct from Danish) for Norwegian make much more use of the feminine.
The translation of bygda as "the village" is not correct. A "bygd" is a rural district, comprising a number of farms and houses, not necessarily with shops, businesses or public services. Often "en bygd" or equally valid, "ei bygd", will have a local dialect, slightly (or more) different from neighbouring "bygder".