Many plants have chemicals in them that may be unsafe in the aquarium.
When branches fall off the trees, or are cut and lie around, alternately wet and dry (sun, rain, snow...) this breaks down most of those chemicals.
Plants that I have used and are safe with fish:
Albizzia jullibrissin (Umbrella Tree, Mimosa)- Root came off a job site, sat in my driveway for a year (wet/dry/wet/dry...) It is falling apart, but I have had it in the tank for 3-4 years? Fish include Bicher, Clown Loach, Common Pleco, Bristlenose Pleco, others.
Lagerstroemia indica (Crape Myrtle)- Found a lot of branches in a horse pasture. I have no idea how long there were there. (Wet/dry...) I soaked them until they sank. Most of my tanks got some. Many different fish including some Loricariads that are wood eating specialists. Good wood, hard, and holds up a long time.
Quecus douglassii (Blue Oak)- Mostly bark. This came pretty fresh off a live tree. When I first put it in a tank (no fish) it turned the water deep wine red. Could not see through the water at all. Took a month of water changes for it to finish producing that much tannins. I have that in many tanks. I soaked it in my pond or a garbage can after starting it in that one tank. Loricariads love it and shaved some pieces down until they fell apart.
Quercus lobata (Valley Oak)- I have used the leaves, fallen from the tree, no treatment, on the floor of a tank. The fish were fine with it, but I found they fell apart too fast, and poofs of disintegrating leaves swirled around in the water whenever I disturbed it.
Arctostaphyllos probably A. glauca (Manzanita)- Collected by others, but ID is positive. Hard, durable, sinks easily.
I have seen tanks with reliably identified Swamp Cypress (collected in FLorida) and some species of Cedar, but the word 'Cedar' is used for too many species for me to be sure. It had been collected in California. At least 4 different species are called 'Cedar'.
Soft woods: Not just conifers, but soft like willow or poplar: Fall apart pretty fast.
Conifers: Many have chemicals that might be toxic if used fresh, but aging destroys these, so if you are OK with short life, conifers might be worth checking out. Swamp Cypress is longer lasting.
Fruit (Apple, Cherry, Apricot, Almond, Plum and related) Have some chemicals that may be toxic when fresh, but probably break down OK. I would be sure these were really well aged before adding them to a tank.
Woods that I know are toxic to mammals (mostly horses) Red Maple (Acer rubra), Black Locust (Robinia pseudoacccia), Oleander (Nerium), Yew (Taxus spp), probably more.
Driftwood: Implies that it has been off the tree for a while, and has spent some time in water, even if it is not now in water. Usually this much time has broken down whatever was in the tree that might have been toxic. If it is driftwood that has been in the ocean then you would need to leach out the salt, but that is really easy. Salt is water soluble, and trace amounts that end up in the tank are not toxic. Driftwood could pick up other toxin such as petroleum products or pesticide. There would be harder to get rid off. Select wood away from the road, away from houses.
Bogwood is any branch or stump that has been under water in a bog for years. There are not a lot of minerals in a bog, and very low oxygen, very low pH. Decay organisms work slowly, if at all. What minerals are there may get picked up by the wood over many years. Usually it is heavy enough to sink even dry.
Fresh prunings of most plants would be suspect. I know Manzanita ages quickly, and is pretty dry even when it is growing, so is ready for the tank quickly. Garden plants are more likely to have been sprayed with something toxic, so select carefully, wash well and age it before trying it in the tank.