These are called the Steinberg generators, and are defined for commutative rings (and larger groups than just $\operatorname{SL}_2$). I'll cover $\operatorname{SL}_2(K)$ for arbitrary fields $K$. Basically, we try to mimic the PLU decomposition of Gaussian elimination (but I write it as UDPU out of habit).
Denote $$x(t) = \begin{bmatrix} 1 & t \\ 0 & 1 \end{bmatrix} \quad \text{and} \quad y(t) = \begin{bmatrix} 1 & 0 \\ t & 1 \end{bmatrix}$$ where $t$ comes from some ring. Then verify $x(s) \cdot x(t) = x(s+t)$, $y(s) \cdot y(t) = y(s+t)$ and $$w = x(1)\cdot y(-1)\cdot x(1) = \begin{bmatrix} 0 & 1 \\ -1 & 0 \end{bmatrix}$$ and finally if $t$ is an invertible element of the ring, then $$h(t) =x(-1)\cdot y(1) \cdot x(-1) \cdot x(1/t)\cdot y(-t) \cdot x(1/t) = \begin{bmatrix} t & 0 \\0 & t^{-1} \end{bmatrix}$$
We now use Gaussian elimination to write an arbitrary matrix of determinant 1 as $$BwU = \left\{ x(rs)\cdot h(-s)\cdot w \cdot x(ts) = \begin{bmatrix} r & (rt-1)\cdot s \\ s^{-1} & t \end{bmatrix} : r,s,t \in K, s\in K^\times \right\}$$ or $$B = \left\{ x(rs)\cdot h(r) = \begin{bmatrix} r & s \\ 0 & r^{-1} \end{bmatrix} : r,s \in K, r \in K^\times \right\}$$
The separate cases based on the zero-pattern (bottom-left entry is 0 or not) is a common feature of the Steinberg generators; the guys $BwU$ and $B$ are called the double cosets in the Bruhat decomposition or the Schubert cells. The elements $w$ (there are more than one for larger matrices) switch patterns. The various $x$ (again, there are more than one of them for larger matrices) take care of the strictly upper triangular part, and the $h$ take care of the diagonal.
If the ring has non-invertible, non-zero elements then more care is needed, but in your case this is enough:
Since the ring is generated additively by $1$, we get $x(t) = x(1)^t$ and $y(t)=y(1)^t$. Since every ring element is either 0 or invertible, the two patterns given handle all matrices of determinant 1.