These sound near-identical in ordinary speech, but they cannot occupy the same slot in a sentence: one is a verb, the other an adjective. That makes the test easier than it looks. If the word is doing something, it is "elicit." If it is describing something, it is "illicit."
A verb. To draw out a response, reaction, or piece of information.
An adjective. Forbidden by law, rules, or custom.
Quick way to remember
Ask whether the word is an action or a description. Actions take "elicit," which starts like "extract" — both draw something out. Descriptions take "illicit," which starts like "illegal."