Many grammar books state that a comma is always required after “i.e.” and “e.g.” used in a sentence, as in “sentences often contain spelling errors, i.e., words spelled incorrectly”. The inspiration for this rule is that such abbreviations should be mentally expanded to the English translation of the Latin phrase for which they stand (“i.e.” translating to “that is”, and “e.g.” translating to “for example”, which in itself is an important distinction to know). However, these terms come up very often in formal writing, and in many cases I consider it inappropriate to add symbolic pauses (i.e. commas) around them. Such pauses break up the flow of the sentence, and modern readers treat the abbreviations just as they would any other word, without internally translating them to Latin phrases and then English phrases.
Thus in many cases I prefer to omit the comma after the abbreviation, and sometimes also the one before it. Some people, even more pedantic than I, disagree.
Dr. James A. Bednar. Tips for Academic Writing and Other Formal Writing