I will phrase this question in terms of attaching smooth manifolds along a submanifold, though it is certainly more general.

Let $M_1$ and $M_2$ be smooth $n$-manifolds (maybe closed, for simplicity), $N$ a closed $k$-manifold, $D$ a closed $(n-k)$-disk bundle over $N$ (so that $D$ is an $n$-dimensional manifold whose boundary is the associated $(n-k-1)$-sphere bundle), and suppose we have embeddings $f_i:D\rightarrow M_i$.

Now say $\tilde{M_i}=M_i\setminus f(N)$, let $E_0$ be the punctured-open-disk bundle associated with $D$, and let $\alpha:E_0\rightarrow E_0$ be defined by sending $v_x$ in the fiber of $x\in N$ to the point $(1-|v_x|)\frac{v_x}{|v_x|}$ in the same fiber (intuitively, $\alpha$ turns $E_0$ inside-out so that we can attach the manifolds with a "collar").

Then if we form the Topological pushout of $\tilde{M_1}$ and $\tilde{M_2}$ using the smooth embeddings $f_1|_{E_0}$ and $f_2|_{E_0}\circ \alpha$, this in fact produces a pushout in the smooth category. The resulting manifold $M$ then has a tangent bundle, and in fact this tangent bundle can be formed by attaching the tangent bundles of $M_1$ and $M_2$ using the same recipe.

So, finally, here is the question: is there a formula for characteristic classes of $M$ (maybe just restrict attention to Stiefel-Whitney, Chern, Pontryagin classes) in terms of the characteristic classes of $M_1$, $M_2$, and $N$ (and the embeddings $f_1$, $f_2$)? More generally, is there a similar formula for attaching arbitrary bundles over arbitrary topological spaces (i.e. we would form a topological pushout on the base spaces and indicate how the fibers would be identified over points that are glued together)?