Here are some common rules for some of the common prefixes:
1.   Use in- for words starting with consonants and vowels (not for words starting with i or u).
2.   Use ir- for words starting with r (example: irresponsible)
3.   Use im- for words starting with m or p (example: immaculate, impossible)
4.   Use il- for words starting with l (example: illogical, illegal)
5.   Use un- for words starting with a consonant or vowel