Can replacing a T&P valve be done as DIY by a home owner?
Can it be done?
Probably.
Should it be done?
Maybe.
Are you allowed to do it?
Depends on your location.
Replacing the valve is fairly straight forward, and can be done following the instructions provided with the replacement valve.  The bigger problem is determining why the valve is leaking, and fixing that problem.
The purpose of the valve is to open if the temperature and/or pressure in the tank reaches or exceeds specific levels. My answer to a previous question, provides more information about these situations. There is another common cause for leaking T&amp;P valves, which may be more applicable to your situation.
Gunk.
When a T&amp;P valve is opened; either during testing of during a fault, gunk (corrosion, mineral deposits, etc) can become lodged in the valve. This gunk prevents the valve from closing properly, which can lead to leaks. If gunk is the problem, replacing the valve may be the only solution required.
If you're not sure why the valve is leaking, you're not comfortable working on hot water tanks (or plumbing in general), or you simply do not have the proper tools for the job. Please do not hesitate to contact a local licensed Plumber.