The empirical pseudopotential method (EPM) within the virtual crystal approximation (VCA) is used to calculate the electronic and optical properties of ternary alloys ZnxCd1−xS, ZnxCd1−xSe, ZnSxSe1−x and MgxZn1−xSe. The alloy band structures and energy gaps are calculated using VCA which incorporates the compositional disorder as an effective potential. The calculated band structures for the ZnxCd1−xS, ZnxCd1−xSe and ZnSxSe1−x alloys show a direct band gap in the whole range of the concentration except for the MgxZn1−xSe alloy which presents a crossover from the direct gap to the indirect one.Also the dependence of the refractive index on the concentration is calculated for each ternary alloy. This parameter is found to depend nonlinearly on the alloy concentration. A detailed comparison of our results with experimental data and works of other authors has led to a good agreement.