It depends on what your income is now versus what you expect your retirement income to be and what your marginal tax rate is now versus what you expect your marginal tax rate to be when you're retired. Since most of the time people expect to have a lower income when retired and therefore a lower marginal tax rate, it makes more sense to defer taxes until then. In that case you would want to take the second option: before tax deposits.
In reality, people have no idea what their income will be in retirement and even less of a clue what the tax rates will be, thanks to our fine legislators continually fiddling with the tax code. So then it boils down to whether you want to pay taxes on the income deposited in the account now or whether you want to pay it later, when you take it out.
In both options, you pay taxes on the GAIN in the account when you take the money out during retirement.