There are two very different approaches, so from a practical perspective, you have to guess what will appeal most to your grader. The bases are determining what is simplest, vs. "most natural". For the former, the answer also depends on the theory of representation and computation that is assumed. Truth in advertising, I advocate the simplicity approach.
The essence of the simplicity approach is to first explicitly state the competing alternatives that are suggested by the data. You have noted that the plural is realized as [an] and [ɛn]. Therefore, you should write the rule for turning /an/ into [ɛn] in one column, and the one turning /ɛn/ into [an] in another column. Then inspect the two formalized rules, and determine which is simpler. Caveat! You have to be able to actually formalize the rule, rather than stating a descriptive generalization in English. If you aren't operating with a formalized theory of computations and representations, your decision as to choice of descriptions of the facts will be narrowly "does A work and B fail?".
In the formal simplicity approach, you just count up the number of things (usually features) that define the respective rules. You have to free yourself from the tyranny of under-considered assumptions, for example thinking that "most of the words in the dataset have [ɛn] so /ɛn/ must be the underlying form" (datasets are typically not random selections from the vastness of an infinite corpus of a language, they are carefully selected to reveal the exact conditions on a rule). Choice of rule entails something about underlying form, choice of underlying form entails something about the rule that would be required to make the analysis work. The main point here is that you have to actually write out the analyses, rather than decide "I don't like that analysis, the underlying form must be /an/".
I cannot overstate the importance of paying attention to technical details of the assumed phonological theory. Some people consider it to be unimportant whether a rule has to be stated using an "or" operator, some people consider such a requirement to be proof that the proposed rule is wrong. Some people hold that rules state surface-true generalizations and some hold that rules state generalizations that are true just at a specific point in the derivation (some people don't have derivations). Some people allow rules to look backwards in a derivation (you can write rules referring to "was underlyingly X") and some do not allow that.
And finally... some people present really tricky problems that mislead you into a false dichotomy, thinking that the choices are limited to the suffix /an/ vs /ɛn/. A third choice is /n/, which implies other analytic alternatives, such as vowel epenthesis or vowel deletion. Suppose that the dataset contain 14 singular/plural pairs. Your descriptive generalization about conditioning factor may be invalid, if e.g. there is exactly one stem supposedly ending with /p/ which triggers selection of [ɛn], etc. There is a third alternative that denies the existence of a certain rule, and completely reconceptualizes the underlying forms.
As far as the naturalness-driven approach is concerned, this depends on having a feeling for what kinds of changes are most common of phonetically natural, so that if one analysis forces you to adopt an "unnatural" rule and the other analysis allows you to draw on more natural rules, you opt for the natural rule (which then tells you what the underlying form is). However, being able to decide what is "natural" is an arcane art that many people never get the hang of, so it is less likely that your instructor will impose phonetic functionality principles on their notion of "best analysis".