Calculations of the properties of NiO, CaO, SrO, and La2NiO4 crystals are used as a basis for determining empirical pairwise potentials which are employed in calculating the structure, lattice dynamics, and certain properties of La2CuO4. The model developed here differs from those proposed before. First, the many-particle Jahn-Teller contributions to the energy and dynamic matrix of the crystal are taken into account. Second, the analytic expressions for the pairwise potentials contain an additional short-range electrostatic screening term. The results are in satisfactory agreement with experimental data.