After the Yom Kippur war, the Egyptian president Sadat became convinced that Israel could not be destroyed by force and it was a foolish thought to keep on wasting the sources of Egypt in fruitless wars.
Israel also had a number of economic problems due to their enormous defense expenditure and world recession. America also pressed Israel to settle their disputes with at least some of the Arab states.
The US President Jimmy Carter took the initiative for a formal negotiation between the two countries at a place called Camp David near Washington. The treaty was finally signed in March 1979.