You'll want to avoid soft woods and especially any really sappy woods. Something like eucalyptus probably not. You'll probably want to boil any fresh wood to get out any sap and as much organic matter as possible.
I just go to the beach and pick up any pieces of driftwood that look good.
I can't say I know how all types will work, but my understanding is harder wood tends to be better than soft wood, and avoid any that will leach toxic substances into the tank. I've used wood from around the yard in a couple of tanks with satisfactory results.