First of all, the original identity has an exponent of $4$ on the left hand side that you have missed. Moreover it is not correct as stated, by simply comparing constant terms of both sides. However it is just a simple typo probably, because the following is true $$\frac{4}{R}\prod_{n=1}^{\infty} \left(\frac{1+R^{-4n}}{1+R^{-4n+2}}\right)^4= \frac{1}{R}\left(2+2 \sum_{n=1}^ {\infty} \frac{1}{R^{2n(n+1)}}\right)^2\left(1+2 \sum_{n=1}^{\infty}\frac{1}{R^{2n^{2}}}\right)^{-2}.$$ To prove it you just have to use some specializations of Jacobi's triple product identity twice. Indeed it says $$\sum_{n=-\infty}^{\infty} x^{n^2}y^n=\prod_{m=1}^{\infty}(1-x^{2m})(1+x^{2m}y)(1+x^{2m}y^{-1})$$ substituting $x=\frac{1}{R^2}$ and $y=\frac{1}{R^2}$ gives $$2+2\sum_{n=1}^{\infty} \frac{1}{R^{2n(n+1)}}=2\prod_{m=1}^{\infty} \left(1-\frac{1}{R^{4m}}\right)\left(1+\frac{1}{R^{4m}}\right)^2$$ and substituting $x=\frac{1}{R^2}$ and $y=1$ gives $$1+2\sum_{n=1}^{\infty}\frac{1}{R^{2n^2}}=\prod_{m=1}^{\infty}\left(1-\frac{1}{R^{4m}}\right)\left(1+\frac{1}{R^{4m-2}}\right)^2.$$ Komatu's identity follows by dividing the first equation by the second and squaring.