Photoelectron diffraction effects may be strongly influenced by optical properties of the solid. Due to refraction and absorption of light at a surface, the state of polarization of light may be changed and, therefore, the corresponding photoelectron diffraction intensity. In order to include optical properties of solids in photoelectron diffraction theory, a general polarization vector of light is defined taking into account both refraction and absorption of light at the vacuum-solid boundary. In a first step, the radiation field of light inside the solid is approximated macroscopically according to classical electrodynamics. Analytical expressions are derived within a real-angle representation of Fresnel equations to reveal the influence of refraction and absorption of light on the state of polarization of light. A general refractive index in dependence on the incident angle of light is introduced which determines the refractive angle inside the solid (refraction law with real angles) and the order of influence of absorption of light. The general polarization vector is applied in the calculation of dipole transition matrix elements in a multiple-scattering cluster model of photoelectron diffraction, where the process of photoabsorption (dipole transition matrix element) and multiple scattering processes of photoelectrons (scattering path operator) are considered separately. Different analytical and numerical results of photoelectron diffraction effects are presented for light of general polarization incident at general angles taking into account the optical properties of the solid. Examples are shown and discussed in detail for Cu(001) and GaAs(110) surfaces.