We prove that a conformal mapping defined on the unit disk belongs to a weighted Bergman space if and only if certain integrals involving the harmonic measure converge. With the aid of this theorem, we give a geometric characterization of conformal mappings in Hardy or weighted Bergman spaces by studying Euclidean areas. Applying these results, we prove several consequences for such mappings that extend known results for Hardy spaces to weighted Bergman spaces. Moreover, we introduce a number which is the analogue of the Hardy number for weighted Bergman spaces. We derive various expressions for this number and hence we establish new results for the Hardy number and the relation between Hardy and weighted Bergman spaces.