In The Oriris Codex
Dynamite can be used to destroy weak sections of walls in the levels. When you pick up dynamite, it is stored in your inventory until you find a place where you can use it. A floating '?' indicates that Lara can interact with the environment. There are several possible types of interaction, one of which is placing the dynamite. 
In Tomb Raider (2013)
Dynamite is one of the more powerful weapons Laras Enemies can throw at Lara. These sticks will explode a short time after landing near her so she has to quickly evade them. They are mostly used to draw her out of hiding. Unlike Molotov Cocktails she can shoot the sticks of dynamite while they are still in the air. There is even an Achievement/Trophy for doing so.