In this work we propose and analyze a weighted reduced basis method to solve elliptic partial differential equations (PDEs) with random input data. The PDEs are first transformed into a weighted parametric elliptic problem depending on a finite number of parameters. Distinctive importance of the solution at different values of the parameters is taken into account by assigning different weights to the samples in the greedy sampling procedure. A priori convergence analysis is carried out by constructive approximation of the exact solution with respect to the weighted parameters. Numerical examples are provided for the assessment of the advantages of the proposed method over the reduced basis method and the stochastic collocation method in both univariate and multivariate stochastic problems.