The cost of getting to and from work is never deductible. Taking public transportation or driving to work is a personal expense, regardless of how far you must travel or whether you get work done during the commute.
But you might be able to deduct some commuting costs if you work at two places in one day, whether or not for the same employer. In this case, you can deduct the expense of getting from one workplace to the other.
You also can deduct some other work-related travel expenses, such as visits to clients and out-of-office business meetings.
If you're self-employed, these expenses would go on your Schedule C or C-EZ. If you're an employee, travel costs must be claimed as unreimbursed business expenses. Be sure to keep good records.
You also could encourage your employer to establish a commuter savings account program. This employee transportation fringe benefit lets workers use pretax dollars to purchase mass-transit passes and pay for parking near work.