She promised to lead a "one-nation" government dedicated to social justice and making "Britain a country that works for everyone".
'As we leave the European Union we will forge a bold new positive role for ourselves in the world and we will make Britain a country that works not for a privileged few but for every one of us.
In her first remarks as prime minister, May commended her predecessor, whom she described as a modern leader.
May, the second female prime minister after Margaret Thatcher, has repeatedly said that "Brexit means Brexit".
He will take on his final session of prime minister's questions before traveling to Buckingham Palace to formally tender his resignation to Queen Elizabeth II.
Britain's Prime Minister, Theresa May, and husband Philip pose for the media outside number 10 Downing Street, in central London, Britain July 13, 2016.
According to the Guardian, May paid the traditional visit to the Queen to be invited to form a government and went to the palace to "kiss hands" with the Queen, as the ceremony is known.
The shock vote partly reflected discontent with European Union rules on freedom of movement that have contributed to record-high immigration - an issue on which May, as interior minister for the past six years, is politically vulnerable.
May will seek to calm the country, and the financial markets, after upheaval following the unexpected result in the June 23 referendum. "I will miss the barbs from the opposition", Cameron said, promising to watch future exchanges as a regular Conservative lawmaker on the back benches. She will also attempt to unite a divided ruling Conservative party and a fractured nation in which many, on the evidence of the vote, feel angry with the political elite and left behind by the forces of globalisation.
"It has been the greatest honor of my life to serve our country as prime minister over these last six years, and to serve as leader of my party for nearly 11 years", he said outside 10 Downing St., accompanied by his wife Samantha and his children - 12-year-old Nancy, 10-year-old Elwen and 5-year-old Florence.
Standing with his family outside the famous black door, Mr Cameron said that he believed he was leaving the country "much stronger" and the economy "immeasurably stronger" after his six years in office.
He said he would miss the "roar of the crowd" in parliament, but assured his colleagues that he would be willing them on from his new position as a regular lawmaker representing his English constituency of Witney, near Oxford.
He said: "We've today had warm words from our new prime minister about the need to stand up for more than a "privileged few".
"I was the future once", Cameron quipped as he left office.
Her appointment comes after weeks of uncertainty after millions of Britons went against her advice, and that of Cameron, and voted to leave the EU.
In his final appearance in Parliament as British Prime Minister, David Cameron opened with the quip that "apart from one meeting in the afternoon with the Queen, my diary is remarkably light". Amid the jokes and tributes in his farewell question period, he fielded questions about eye surgery and a health scandal, along with criticism about the rise in food banks and his part in calling the Brexit vote.
Trying to reclaim his legacy from Brexit, Cameron said his government had cut the deficit, overseen economic growth and legalized same-sex marriage.
For me politics has always been about public service in the national interest.
"If you're from an ordinary working-class family, life is much harder than many people in Westminster realize", she said in a speech outside her new official residence at 10 Downing Street.
"The UK finally has a new prime minister...Goodbye Mr. Cameron".
European Commission President Jean-Claude Juncker called on May to swiftly engage in divorce talks with the European Union.