For a BSDE :
$$y_t = \xi + \int_{t}^{T}g_0(s)ds - \int_{t}^{T}z_sdB_s$$
Which has a fixed $\xi \in L^2(\mathscr{F}_T)$ and $g_0(\cdot)$ satisfying $E(\int_{0}^{T}|g_0(t)|dt)^2 < \infty$. There exists a unique pair of process $(y., z.)\in L_{\mathscr{F}}^2(0,T;R^{1+d})$ satisfies the BSDE shown before.
How to use the Burkholder-Davis-Gundy (BDG) inequality to prove the following inequality?
$$E[\sup_{0 \leq t \leq T} |y_t|^2]< \infty$$
Assume that $g=0$. The quadratic variation of $y$ is given by: $$\langle y\rangle_t = \int_t^T z_s^2 ds \leq \int_0^T z_s^2 ds $$ The BDG inequality tells you that, for some $C>0$, we have: $$\mathbb{E} \left[ \sup_{0 \leq t \leq T}|y_t|^2 \right] \leq C \mathbb{E} \left[ \langle y\rangle_0 \right] \leq C \mathbb{E} \left[ \int_0^T z_s^2 ds \right] < \infty$$ where the last inequality follows by the assumption imposed on $z$.
If $g \neq 0$, then an application of the triangle inequality plus the conditions on $g$ and $\xi$ guarantee the same result.
Alternatively, one could use Doob's maximal inequality to get: $$\mathbb{E} \left[ \sup_{0 \leq t \leq T}|y_t|^2 \right] \leq 4\mathbb{E}(|Y_T|^2) = 4\mathbb{E}({\xi^2}) < \infty$$