Density functional theory (DFT) is performed to study the structural, electronic and optical properties of cubic fluoroperovskite AMF(3) (A = Cs; M = Ca and Sr) compounds. The calculations are based on the total-energy calculations within the full-potential linearized augmented plane wave (FP-LAPW) method. The exchange-correlation potential is treated by local density approximation (LDA) and generalized gradient approximation (GGA). The structural properties, including lattice constants, bulk modulus and their pressure derivatives are in very good agreement with the available experimental and theoretical data. The calculations of the electronic band structure, density of states and charge density reveal that compounds are both ionic insulators. The optical properties (namely: the real and the imaginary parts of the dielectric function epsilon(omega), the refractive index n(omega) and the extinction coefficient k(omega)) were calculated for radiation up to 40.0 eV.