To every rational vertex operator algebra V we associate an automorphic form on Г′ (1) that we call the Wronskian of V. We have previously shown [M2], [M3] that in the case of Virasoro minimal models it is possible to give qualitative arguments about the Wronskian by using the representation theoretic methods. Here we apply the theory of automorphic forms and extend our previous work to a larger class of vertex operator algebras. We also give a detailed analysis of two-dimensional modular invariant spaces that arise from affine Kac-Moody Lie algebras.