The structural, mechanical, electronic, optical, and dynamical properties of BaLiF3, BaLiH3, and SrLiH3 cubic perovskite materials are theoretically investigated by using first principles calculations. Obtained results are in reasonable agreement with other available theoretical and experimental studies. The considered materials are found to be mechanically stable in the cubic structure. We found that all materials are brittle. The modified Becke-Johnson (mBJ) exchange potential has been used here to obtain an accurate band order. The calculated band-gap energy value of BaLiF3 (8.26 eV) within the mBJ potential agrees very well with the experimentally reported value of 8.41 eV. In order to have a deeper understanding of the bonding mechanism and the effect of atomic relaxation on the electronic band structure, the total and partial density of states have also been calculated. We have investigated the fundamental optical properties, such as the real epsilon(1) (omega) and imaginary epsilon(2) (omega) parts of the dielectric function, absorption coefficient alpha(omega), reflectivity R(omega), and refractive index n(omega) in the energy range from 0 to 40 eV within the mBJ potential. The band-gap energy obtained from the absorption spectrum is around 8.76, 3.99, and 3.31 eV for BaLiF3, BaLiH3, and SrLiH3 crystals, respectively. It should be noted that BaLiF3 could be a strong potential candidate as a laser material for the development of a vacuum-ultraviolet light emitting diode once direct transition is confirmed by experimental studies. Finally, we have calculated the lattice dynamical properties of BaLiF3, BaLiH3, SrLiH3, and SrLiF3 crystals. The full phonon dispersion curves of these materials are reported for the first time. Our results clearly indicate that the materials are dynamically stable, except for SrLiF3, in the cubic structure. The obtained zone-center phonon frequencies of BaLiF3, BaLiH3, and SrLiH3 accord very well with previous experimental measurements.