Generally charity work is considered voluntary, and you are not entitled to deduct the cost of services you perform for the charity. However, if in connection with the volunteer work you incur out-of-pocket expenses, you may be entitled to deduct some of those expenses.

Examples of those expenses are listed below:

Qualifying Expenses
If the amounts that you pay out-of-pocket for food and other supplies used are not reimbursed by the charity, generally you may deduct these expenses as contributions to the charity.
Additionally, if the amounts that you pay to travel are not reimbursed by the charity, and you derive no personal benefit from the travel, the expenses are deductible. Qualifying expenses include gasoline for your car and fares for taxis or public transportation.
Other out-of-pocket expenses incurred in connection with services you provide to a charity that are deductible include costs related to uniforms, travel, meals, and lodging.

Other important notes:
Special mileage rate
If you perform a service on behalf of a charity, such as delivering meals to a shelter that services the homeless, you can use a special IRS mileage rate to calculate charitable contribution deductions involving use of your car. This special rate is 14 cents per mile, which is statutorily set.
Keep receipts

If you take a deduction for out-of-pocket expenses you incurred incident to your performance of services for a charity, it is important to have receipts to document these expenses. It is also a good idea to get a written acknowledgement from the charity for the services you provide.