The typical answer is once a year you should drain it to remove the sediment. This truly varies though based on your water and how much calcium and other minerals are in it (i.e. the hardness)
Another item to check is the anode rods as they help protect the heating elements (electric heaters) and tank (unless it is plastic or glass) from rusting. This should be done typically every three to five years. This also has to deal with the water quality.
I would also check the manufacturer's directions.
For more information:
Read Sean Lintow's blog post "Basic Water Heater Maintenance - draining the tank."