Using Wiener chaos expansion (WCE), we develop numerical algorithms for solving second-order linear parabolic stochastic partial differential equations (SPDEs). We propose a deterministic WCE-based algorithm for computing moments of the SPDE solutions without any use of the Monte Carlo technique. We also compare the proposed deterministic algorithm with two other numerical methods based on the Monte Carlo technique and demonstrate that the new method is more efficient for highly accurate solutions. Numerical tests verify that the scheme is of mean-square order $O( \frac{\Delta^{N/2}}{\sqrt{(N+1)!}})$ for diffusion and for diffusion-reaction SPDEs with constant or variable coefficients, where $\Delta$ is the time step, and $N$ is the Wiener chaos order.