  The weight multiplicities of finite dimensional simple Lie algebras can be
computed individually using various methods. Still, it is hard to derive
explicit closed formulas. Similarly, explicit closed formulas for the
multiplicities of maximal weights of affine Kac--Moody algebras are not known
in most cases. In this paper, we study weight multiplicities for both finite
and affine cases of classical types for certain infinite families of highest
weights modules. We introduce new classes of Young tableaux, called the {\em
$($spin$)$ rigid tableaux}, and prove that they are equinumerous to the weight
multiplicities of the highest weight modules under our consideration. These new
classes of Young tableaux arise from crystal basis elements for dominant
maximal weights of the integrable highest weight modules over affine Kac--Moody
algebras. By applying combinatorics of tableaux such as the Robinson--Schensted
algorithm and new insertion schemes, and using integrals over orthogonal
groups, we reveal hidden structures in the sets of weight multiplicities and
obtain explicit closed formulas for the weight multiplicities. In particular we
show that some special families of weight multiplicities form the Pascal,
Catalan, Motzkin, Riordan and Bessel triangles.
