Here is the general condition: If $\mathcal D:\mathscr J\to\mathbf{Top}$ is a diagram of spaces and $\mathscr J$ is a very small category (meaning that for any object $a$ in $\mathscr J$ there is an upper bound for the length of compositions of arrows ending at $a$), then $D$ may be called cofibrant if for every $a\in \mathscr J$, the arrow $s^\mathcal D_a:\partial_a(\mathcal D)\to \mathcal D(a)$ is a cofibration, where $s^\mathcal D_a$ is defined as follows:
Let $\partial a$ be the subcategory of $(\mathscr J\downarrow a)$ missing the object $\mathbf 1_a$, and let $\pi_a:\partial a\to \mathscr J$ be the projection functor. If $\partial_a(\mathcal D)$ denotes the colimit of the functor $\mathcal D\pi_a$, then the maps $\mathcal D(m):D(e)\to D(a)$ at the object $m:e\to a$ of $\partial a$ induce an arrow $s^\mathcal D_a: \partial_a(\mathcal D)\to \mathcal D(a)$.
For the diagram $\mathcal D=B\leftarrow A\to C$ this amounts to both maps being cofibrations since $s^\mathcal D_B=(A\to B),\ s^\mathcal D_C=(A\to C),$ and $s^\mathcal D_A=(\emptyset\to A)$.
For cofibrant diagrams $\mathcal D$, the fiber projection $p_f:\text{hocolim}(\mathcal D)\to\text{colim}(\mathcal D)$ is a homotopy equvalence.
The reason behind this is that $\mathbf{Top}$ is a model category, and so is $\mathbf{Top}^\mathscr J$ when $\mathscr J$ is a very small category. The fibrations and weak equivalences are defined pointwise. The cofibrations, however, are a bit difficult to describe, but cofibrant diagrams are then just the diagrams satisfying the property above.
Now the homotopy colimit can be expressed as the colimit of a certain cofibrant diagram $Q\mathcal D$, which is pointwise homotopy equivalent by a canonical diagram map $Q\mathcal D\to D$, and the colimit of that map is just the fiber projection $p_f$. But between cofibrant diagrams the colimit preserves weak equivalences, being left adjoint to the constant diagram functor $\Delta:\mathbf{Top}\to\mathbf{Top}^\mathscr J$, which preserves fibrations and acyclic fibrations.