In this paper, we analyze the theta series associated to the quadratic form \(Q(\vec {x}) :=x_1^2+x_2^2+x_3^2+x_4^2\) with congruence conditions on \(x_i\) modulo 2, 3, 4 and 6. By employing special operators on modular, non-holomorphic Eisenstein series of weight 2, we construct a basis for Eisenstein space for levels \(2^k, k\le 7\) , \(3^{\ell }, \ell \le 3\) and p, for odd prime p. Using the relation between the trace of Frobenius on an elliptic curve and the Fourier coefficients of the cusp form part of theta series corresponding to Q, we establish relation between the number of integer solutions to the equation \(Q(\vec {x}) = p\) and the number of \(\mathbb {F}_p\) -rational points on the associated elliptic curve under certain congruence conditions on p.