That is, for example, namely, and so forth. When should we write these in full as English words (i.e. not in the abbreviated Latin)? When should they be followed by a comma (if at all)?
I tend to write out these phrases in full except when in parentheses or in footnotes or otherwise marginal text; and not to use a comma after unless needed to separate the phrase off from what it introduces to avoid a double-take in reading (e.g., eggs and ham).
Whether to add a comma after e.g. or i.e. is answered differently according to which style guide you consult. For example, The Oxford Guide to Style (2002) has the following advice:
Do not confuse 'e.g.' (exempli gratia), meaning 'for example', with 'i.e.' (id est), meaning 'that is'. Compare hand tools, e.g. hammer and screwdriver with hand tools, i.e. those able to be held in the user's hands. Print both in lower-case roman, with two points and no spaces, and preceded by a comma. In OUP style 'e.g.' and i.e.' are not followed by commas to avoid double punctuation; commas are often used in U.S. practice. Take care to distinguish 'i.e.' from the rarer 'viz.' (videlicet, namely). Formerly, some writers used 'i.e.' to supply a definition or paraphrase, and 'viz.' to introduce a list of items. However, it is OUP's preference either to replace 'viz.' with 'namely', or to prefer 'i.e.' in every case.
But The Chicago Manual of Style, 15th ed. (2003) advocates the opposite approach:
Expressions of the that is type are usually followed by a comma. They may be preceded by a comma, an em dash, or a semicolon; or the entire phrase they introduce may be enclosed in parentheses or em dashes. When or is used in the sense of "in other words," it is preceded by a comma. 'Bones from various small animals (e.g., a squirrel, a cat, a pigeon, a muskrat) were found in the doctor's cabinet.' Note that "e.g." and "i.e." are not italicized.
Fowler’s Modern English Usage submits that
whether a comma follows e.g. or not is indifferent, or rather is decided by the punctuation-pitch of the writer of the passage.
So gauge your pitch and pitch accordingly!
(See e.g. Grammar Girl for more on using e.g and i.e.)