External pressure significantly alters the physical properties of inorganic halide perovskites, providing the way for the mass production of several optoelectronic elements. This work evaluates the effects of pressure on the mechanical, optical, structural, electrical, phonon, and thermal attributes of LiXCl3 (X = Be, Mg) perovskites using density functional theory (DFT). LiBeCl3 and LiMgCl3 are structurally and thermodynamically stable between 0 and 200 GPa, based on the formation enthalpy and Born stability criteria. LiBeCl3 and LiMgCl3 both have a positive phonon response, indicating their dynamic stability. Under applied pressure, LiXCl3 (X = Be, Mg) possesses an adjustable band gap in the spectrum of visible light, making it a good candidate for a solar cell absorber surface. LiMgCl3, an indirect band gap semiconductor, exhibits an intriguing behavior whereby it transforms into a direct band gap semiconductor upon application of 150 GPa of pressure. The electronic condition is represented by the partial density of states (PDOS); however, its intensity changes with pressure. It is notably attributed to Cl-3p in the valence band (VB) and Li-2p in the conduction band (CB). According to the calculated refractive index and static real component of the dielectric function, pressurized LiXCl3 (where X = Be, Mg) is suitable for photonics. Ultraviolet scanners can benefit from their great absorption and low reflection at elevated energies under pressure. Increased pressure causes increased elastic constants, ductility, hardness, elastic moduli, and anisotropy. Furthermore, pressure-induced modifications to mechanical features have potential uses in adaptive electronic devices, structural design, and many other fields.