The Foreign Secretary made the remarks on the second day of his trip to the Middle East, where he has met both Israeli and Palestinian leaders.
The former prime minister visited the Occupied Palestinian Territories on Friday, committing a further £30 million in aid for the people of Gaza.
It comes as Prime Minister Rishi Sunak welcomed the “critical” temporary truce in the Israel-Hamas conflict but warned it was only the “first step” towards the release of all hostages.
Hamas has released the first batch of hostages under a ceasefire deal, including 13 Israelis who had been held in the Gaza Strip since the militant group staged a raid on Israel nearly seven weeks ago.
They are the first of 50 people to be released from Gaza during a four-day truce that began on Friday.
The freed Israeli hostages included eight women – six in their 70s and 80s – and three children.
Israel confirmed later that it had released 39 Palestinian prisoners as part of the agreement.
Lord Cameron, speaking amid the first significant halt in the fighting since the conflict began, warned Israel that it needed to look beyond the conflict and consider the need for Palestinians to live in “stability” too.
He told the BBC: “Ultimately, there won’t be long-term safety and security and stability for Israel unless there is long-term safety, security and stability for the Palestinian people.
“And you have to start thinking about the future… You’ve got to paint a picture of actually the Palestinians living in peace, stability and security.”
He also expressed deep concern about violence by settlers in the West Bank.
Lord Cameron said: “People are actually targeting and on occasion killing Palestinian civilians, it’s completely unacceptable and those people responsible for that, it’s not good enough just to arrest them, they need to be arrested, prosecuted and imprisoned. These are crimes.”
Mr Sunak earlier said the UK will work with partners in the Middle East to “make sure that this deal sticks”, as more life-saving humanitarian aid began entering Gaza as part of the agreement.
He told broadcasters: “We’ve consistently pushed for sustained humanitarian pauses so that we could get more aid into Gaza and get hostages out, so this is a very welcome development.
“It’s obviously the first step. We need to make sure everyone abides by the terms of the agreement and we want to see all hostages released, including protecting the safety of British nationals that are involved.”
Mr Sunak thanked Qatar and Egypt for the intensive weeks-long diplomacy in helping to secure the deal.
The Prime Minister continued: “We’re continuing to work with all our partners in the region, whether that’s America, Israel and Egypt and others to make sure that this deal sticks and we can continue to do what we want to support everyone in Gaza, get more aid in and to ensure the safety and release of all hostages.”
Lord Cameron called the return of hostages a “huge relief”.
He said his thoughts were with those “still waiting for their loved ones to come home”.
Lord Cameron’s talks with Palestinian leaders were to focus on how UK efforts can help ease the suffering of Gaza’s citizens, who have been bombarded and besieged by Israel as it attacks Hamas in response to the October 7 atrocities.
He was pictured looking over the West Bank with representatives from aid organisations, where he heard about Israeli settlement expansion and violence towards Palestinians.
Lord Cameron also met senior UN officials in Jerusalem, where he offered his condolences for the 108 UN workers killed during the current crisis, the department said.
He announced £30 million of new funding for aid such as shelter and medical provisions as a fourth British aircraft carrying 23 tonnes of critical supplies including blankets and sleeping mats landed in Egypt, for onward transfer to Gaza.