The names "$t$-test" and "$z$-test" are typically used to refer to the special case when $X$ is normal $\mbox{N}(\mu,\sigma^2)$, $\hat{b}=\bar{x}$ and $C=\mu$$C=\mu_{0}$. You can however of course construct tests of "$t$-test type" in other settings as well (bootstrap comes to mind), using the same type of reasoning.
Either way, the difference is in the $\mbox{s.e.}(\hat{b})$ part:
- In a $z$-test, the standard deviation of $\hat{b}$ is assumed to be known without error. In the special case mentioned above, this means that $\mbox{s.e.}(\hat{x})=\sigma/\sqrt{n}$$\mbox{s.e.}(\bar{x})=\sigma/\sqrt{n}$.
- In a $t$-test, it is estimated using the data. In the special case mentioned above, this means that $\mbox{s.e.}(\hat{x})=\hat{\sigma}/\sqrt{n}$$\mbox{s.e.}(\bar{x})=\hat{\sigma}/\sqrt{n}$, where $\hat{\sigma}=\sqrt{\frac{1}{n-1}\sum_{i=1}^n(x_i-\bar{x})^2}$ is an estimator of $\sigma$.
The choice between a $t$-test and a $z$-test, therefore, depends on whether or not $\sigma$ is known prior to collecting the data.
The reason that the distribution of the two statistics differ is that the $t$-statistic contains more unknowns. This causes it to be more variable, so that its distribution has heavier tails. As the sample size $n$ grows, the estimator $\hat{\sigma}$ comes very close to the true $\sigma$, so that $\sigma$ essentially is known. So when the sample size is large, the $\mbox{N}(0,1)$ quantiles can be used also for the $t$-test.