This paper (free access) answers your question theoretically, but the result doesn't look useful in practice.
If you Google for "parametrization of the modular group", you get this paper, which you can rent for a day for 0.99; the Google context says "Therefore, we have a complete parametrization of the modular group". (I didn't rent it to look inside.)
Here's another paper that appears to address the question.
This dissertation says "there is no polynomial parametrization in three integer variables of SL_2(\mathbb{Z})".
Since you mention the parametrization of the Pythagorean triples: this parametrization of SL_2(\mathbb{R})$ uses matrices of trigonometric and hyperbolic functions that can be restricted to rational values using Pythagorean triples:
$\left(\begin{array}{cc}\cosh\theta&\sinh\theta\\\sinh\theta&\cosh\theta\end{array}\right)= \left(\begin{array}{cc}\frac{c}{b} & \pm \frac{a}{b}\\\pm \frac{a}{b} & \frac{c}{b}\end{array}\right)\;, $
$\left(\begin{array}{cc}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{array}\right)= \left(\begin{array}{cc}\pm\frac{a}{c} & \mp \frac{b}{c}\\\pm \frac{b}{c} & \pm\frac{a}{c}\end{array}\right)\;. $
Conversely, $\cos\theta=a/r$ and $\sin\theta=b/s$ in reduced form yields
$\left(\frac{a}{r}\right)^2+\left(\frac{b}{s}\right)^2=1\;,$
which is only possible if $r=s=c$ and thus $a$, $b$ and $c$ form a Pythagorean triple; and similarly for the hyperbolic case. This yields a parametrization of $SL_2(\mathbb{Q})$, but I'm afraid it doesn't help you much with $SL_2(\mathbb{Z})$, since I don't see how to get rid of the denominator or how to deal with the diagonal matrices $d_1$ and $d_2 in the integer case.
P.S.: A more pedestrian way of enumerating the matrices in SL_2(\mathbb{Z})$ would be to enumerate the pairs of coprime integers $a$, $b$, solve $ad-bc=1$ for $c$ and $d$, and use all tuples of the form $(a,b,c+na,d+nb)$.