If you collect your own driftwood, soak it in VERY salty water for a couple of weeks in a large trashcan....this will do a couple of things..
1. Sterilize and kill anything on or in the wood
2. leach the tannins from the wood reducing water discoloration when added to the tank.
After the salt soaking, you will want to scrub, scrape, and clean the wood very well to remove any dirt and soft decaying wood.
Then rinse it off well under the hose, and soak it for a few more days in clean, fresh water to remove any salt from the wood.
Most store bought driftwood is already safe to use.