You make 401(k) contributions with pretax dollars, so you don't get to write them off on your taxes. When you sign up for a 401(k) plan, your employer takes your contributions out of your earnings before you get your salary. By the time you're paid, the money is already gone from your taxable income. You don't have to do anything to write it off.
The more money you contribute to your 401(k), the more you exclude from your taxable income. As of 2013, you can contribute up to $17,500 a year to your account. Some plans offer a smaller limit. You pay Social Security and Medicare taxes on your plan contributions but no income taxes.
The money in your 401(k) doesn't really exist, as far as the Internal Revenue Service is concerned. If your plan investments have an incredible year and double in value, you still don't pay taxes as long as the cash stays in your account. If your employer contributes to your account, that money also doesn't show up on your taxes. There's no need to take a deduction or report any income regarding your account.
Normally, any money you take out of your 401(k) is taxable income. Rollovers are an exception. If you leave your job for another one, you can roll your old account over to your new employer's plan. You can also roll the money into an IRA. You get no tax deduction for a rollover, but you also don't have to pay taxes on the transfer.
There are times when not taking a deduction for a 401(k) works to your advantage. Your qualification for a long list of tax breaks -- including education credits, Roth IRA contributions and the earned income tax credit -- depends on your modified adjusted gross income. The higher it is, the less of a break you get -- if it's high enough, the tax breaks disappear. Your MAGI includes your IRA contributions but not 401(k) contributions. If your MAGI is dangerously high, putting more in your account can drag it back down.