A novel, efficient method for calculating the temperature dependencies of the linear dielectric functions of semiconductor systems and its application are presented. The method follows an intuitive and natural path with ab-initio finite temperature molecular dynamics providing the thermally perturbed atomic configurations, which are used as structural inputs for calculating the dielectric function. The effect of lattice dynamics, including quantum zero point vibration, on the electronic bands and dielectric function of crystalline (c-) GaAs and Si as well as hydrogenated amorphous Si (a-Si:H) is discussed. Our theoretical results for bulk c-GaAs and c-Si in the range from 0 to 1000 K are in good overall agreement with highly accurate ellipsometric measurements. The implementation of the method resolves a serious discrepancy in energy and line shape between experiment and the latest optical models, all of which neglect lattice dynamics, and provides information on the indirect gap and indirect optical transitions in c-Si. For aSi:H, the calculated temperature dependent optical response combined with the vibrational spectroscopy provides detailed insight into electronic, dynamical properties, and stability of this important prototypical amorphous semiconductor material. At semiconductor surfaces, dynamical effects are expected to be even more pronounced due to reduced atom coordination and reconstruction. This is demonstrated for C(111) 2 Â 1, an intensively studied but controversial surface of the quantum diamond crystal.