This is the representation of Jacobi sine in terms of theta-functions. Your $A$ and $B$ are $\theta_1$ and $\theta_3$ up to constant factors. See, for example
Formules et propositions pour l'emploi des fonctions elliptiques d'apres les lecons et de notes manuscrites de M. K. Weierstrass redigees et publiees par M. H. A. Schwarz...Paris, 1894, Art. 26, p. 30. (available online), or
N. Akhiezer, Elements of the theory of elliptic functions, AMS, 1990. (Tables of formulas at the end, Table XII).
The reference in Gradshtein-Ryzhyk is on another handbook on elliptic functions, by A. M. Zhuravskiy (1941, in Russian). I checked it, it gives expressions for coefficients for $n\leq 6$. The general pattern does not seem to have any closed form expression.
These coefficients are even polynomials in $k$, with integer coefficients, but entering their coefficients into OEIS does not give a result.