On the other hand, one might want to interpret the question as asking how one could 'generate' all of the metrics that satisfy this diagonalizability property, at least locally. This is a more interesting (and more challenging) problem. Willie and Thomas have each given examples of classes of such metrics that essentially depend on one function of $n$ variables: Willie cited the conformally flat metrics, which are locally of the form $e^u g_0$ where $g_0$ is the standard metric on $\mathbb{R}^n$, and Thomas cited the induced metrics on hypersurfaces in a space form of dimension $n{+}1$, each of which, locally, can be described as the graph of one function of $n$-variables). The interesting question is whether these are, themselves, special cases of some more general class of metrics with the desired property. Might there be a class of examples that depend on more than one arbitrary function of $n$ variables? Another interesting question is whether their examples 'reach' all the curvature tensors that satisfy the relations $R_n$$\mathcal{I}_n$ and, if not, whether are there other examples that do.
This latter question is easier to answer than the former. It is easy to see, just by an algebraic count, that neither the conformally flat metrics nor those induced on hypersurfaces in space forms can actually `reach' all of the $\mathrm{O}(n)$-orbits in $\mathcal{R}_n$. (In fact, theseThe two sets of orbits that they reach do overlap, butand they are distinct, proper closed subsets of $\mathcal{R}_n$.) On the other hand, examples provided by É. Cartan of nondegenerate submanifolds of dimension $n$ in $\mathbb{R}^{2n}$ that have flat normal bundle turn out to have their curvature tensors in $\mathcal{R}_n$ and, using these, one cancan reach every orbitan open subset of the orbits in $\mathcal{R}_n$. However Now, Cartan's examples depend locally on $n^2{-}n$ arbitrary functions of two variables (not $n$ variables), and it turns out that they satisfy many more differential equations (of higher order) than just the $R_n$ equations on the curvature$\mathcal{I}_n$. (For For example, in Cartan's examples, the diagonalizing coframecoframing $\omega=(\omega_i)$ turns out to be integrable, i.e., $\omega_i\wedge d\omega_i = 0$ for all $i$, so that the metric itself can be diagonalized in a local coordinate chart, i.e., it and thus is locally of the form $$ g = e^{2f_1}\ {dx_1}^2 +e^{2f_2}\ {dx_2}^2 + \cdots + e^{2f_n}\ {dx_n}^2. $$ ConverselyMeanwhile, the condition for such a metric in this form to have its curvature tensor be diagonal with respect to the coframing $\omega_i = e^{f_i}\ dx_i$$\omega = (\omega_i) = (e^{f_i}\ dx_i)$ and, hence, lietake values in $\mathcal{R}_n$ turns out to be an involutive system of second order PDE for the functions $f_i$ whose general local solution depends on $n^2{-}n$ arbitrary functions of two variables. Using These turn out to be slightly more general than the ones that arise as Cartan's examples, and, using solutions of this type, one can reach all of the $\mathrm{O}(n)$-orbits in $\mathcal{R}_n$.)
However, the question of how to 'generate' the 'general' metric whose curvature tensor liestakes values in $\mathcal{R}_n$ for $n\ge 4$ seems to be a very difficult problem. It's It is an overdetermined system for the metric that is not involutive, and computing its first two prolongations, even in the $n=4$ case, yields a system that is extremely algebraically complicated and still not involutive. Thus, I do not know (and I believe that it is not known) whether the general local solution of this problem depends (modulo diffeomorphism) on more than one arbitrary function of $n$ variables.