This thesis is devoted to the study of Raman scattering from first-principles. We develop two different methods to calculate Raman spectra of large model structures. The first method concerns the extension of the perturbative variational approach for the calculation of dielectric tensors to the case of ultrasoft pseudopotentials, allowing a significant improvement in the size of the affordable systems. The second method permits to treat finite electric fields in Car-Parrinello molecular dynamics simulations with periodic boundary conditions. Applied to the calculation of Raman spectra, this approach, in the case of large systems, gives a further significant reduction of the computational effort required to obtain Raman spectra. The methods we develop in the first part of the thesis are then applied to the study of vitreous silica and vitreous boron oxide. By applying our perturbative approach, we obtain the Raman spectrum for a model structure of vitreous silica. The accurate description of the Raman couplings allows us to derive an estimate from the experimental spectrum for the concentration of oxygen atoms in three- and four-membered rings. Finally, we apply the finite field method to calculate the Raman spectrum of a large model structure of vitreous boron oxide. By investigating the contributions to the Raman spectrum from vibrations of different symmetry, we can extract from the experimental spectrum an estimate for the concentration of boron atoms belonging to three-membered rings.