Let $f$ be an extended real valued measurable function. Then we need to show that there exists a sequence of real-valued simple functions that converge to $f$. We also need to show that if $f$ is bounded then this convergence is uniform.
Now for any non-negative measurable function we can take $f_n$ to be $$f_n(x)=\sum_{k=0}^{n-1}f\left(\frac{k}{n}\right)\textbf{1}_{\left(\frac{k}{n},\frac{k+1}{n}\right]}(f(x))+n\textbf{1}_{[n,\infty)}(f(x)).$$ Then $f_n\rightarrow f$. Now if $f$ is any measurable function, define, $f^{+}=\max(0,f), f^{-}=\max(0,-f)$, Then we will get a sequence, $g_n$, of simple functions increasing to the non-negative measurable function $f^{+}$ and a sequence, $h_n$, of simple functions increasing to the non-negative measurable function $f^{-}$. Then $g_n-h_n$ is again a simple function and the sequence of functions $\{g_n-h_n\}$ converges to $f^{+}-f^{-}=f$.
However I cannot show why boundedness of $f$ should imply that this convergence should be uniform. Although I have an idea, that as for constructing $f_n$ I divided the interval $[0,n)$, here I should divide the interval $[0,M]$ into small parts, where $M$ is the upper bound of $f$ and then show that the convergence is uniform, but couldn't show it. Can you help?
The choice of $f_n$ in the opening post should be $$f_n(x):=\sum_{j=0}^{n2^n-1}j2^{-n}\chi_{\{j2^{-n}\leqslant f(x)\lt (j+1)2^{—n}\}}+n\chi_{\{f(x)\geqslant n\}}.$$ If $f\colon X\to \overline{\mathbb R}$ is bounded by $M$, then $f_n(x)=\sum_{j=0}^{n2^n-1}j2^{-n}\chi_{\{j2^{-n}\leqslant f(x)\lt (j+1)2^{—n}\}}$ if $n\geqslant M$. Fix such an $n$. If $x\in X$, then there is $j\in \{0,\dots, n2^n-1\}$ such that $j2^{-n}\leqslant f(x)\lt (j+1)2^{—n}$. We thus have $|f(x)-f_n(x)|\leqslant 2^{-n}$. Since $x$ was arbitrary, we get $\sup_{x\in\mathbb R}|f(x)-f_n(x)|\leqslant 2^{—n}$, hence uniform convergence.