Using a model structure consisting of a network of corner sharing tetrahedra, we calculate the infrared spectrum of amorphous SiO2 within a first-principles approach and find good agreement with experiment both for the positions and the intensities of the main peaks. In addition to the vibrational properties, this required the dynamical charge tensors, which were obtained applying the recent quantum polarization theory. The relative intensities in the spectrum depend sensitively on the charge tensors and their anisotropic components are crucial to obtain good agreement with experiment. We find that the Born charges can be correlated to the local structural properties.