Speaking outside No 10 after visiting Buckingham Palace, he said the UK was “on the brink of something special”.
The Conservatives have 331 seats – five more than needed for a Commons majority – their first such victory since 1992.
Mr Cameron’s rivals Ed Miliband, Nick Clegg and Nigel Farage have all resigned after election disappointment.
The Conservative leader is now beginning the process of putting together the new government. George Osborne has been reappointed as chancellor, Theresa May as home secretary, Philip Hammond as foreign secretary and Michael Fallon as defence secretary.
In other election developments:
- With all 650 seats declared, the Conservatives have ended up with 331 seats in the House of Commons, 24 more than in 2010. Labour have 232, the Lib Dems 8, the SNP 56, Plaid Cymru 3, UKIP 1, the Greens 1 and others 19
- The Conservatives get a 36.9% share of the UK national vote, Labour 30.4%, UKIP 12.6%, the Lib Dems 7.9%, the SNP 4.7%, the Green Party 3.8% and Plaid Cymru 0.6%
- Ed Miliband steps down after a “difficult and disappointing” night for Labour which saw Ed Balls lose and Jim Murphy and Douglas Alexander defeated by the SNP
- Nick Clegg said he would quit as leader after a “crushing” set of losses, which saw Vince Cable, Danny Alexander, David Laws, Simon Hughes and Charles Kennedy among a slew of Lib Dem casualties
- Nigel Farage has quit as UKIP leader after failing to be elected – although he may stand in the ensuing leadership contest. He has recommended Suzanne Evans take over as interim leader
- George Galloway, who was reported to the police for retweeting an exit poll before voting ended, has lost to Labour in Bradford West
- Conservative minister Esther McVey was the highest-profile Tory loser, defeated by Labour in Wirral West as Boris Johnson returned to the Commons
- The Green Party gets one seat after Caroline Lucas retains the Brighton Pavilion constituency she won in 2010
- Turnout is set to be 66%, marginally up on 2010 and the highest since 1997
- An inquiry is to be held into the mismatch between opinion polls during the campaign and the actual result
- Watch BBC election coverage and follow latest reaction
- Read more analysis from the BBC’s experts
- Find your constituency’s result
The Conservatives’ victory means they will be able to govern without the need for a coalition or a formal agreement with other parties.
Mr Cameron said he had spoken to both Mr Miliband and Mr Clegg, paying tribute to the latter’s contribution to the coalition government over the past five years.
Speaking in Downing Street, he said: “We will govern as a party of one nation, one United Kingdom.
“That means ensuring this recovery reaches all parts of our country, from north to south, to east to west.”
He said he would press ahead with devolution of powers to all nations as well as referendum on the UK’s EU membership.
“I have always believed in governing with respect,” he said “That’s why in the last parliament we devolved power to Scotland and Wales, and gave the people of Scotland a referendum on whether to stay inside the United Kingdom.
Analysis by BBC experts
Norman Smith on David Cameron’s colossal achievement
Nick Robinson on the result no-one saw coming
Mark Easton on a nation divided
Jonny Dymond on how the Conservatives won their historic victory
Jonny Dymond on where next for Labour
Brian Taylor on what next for Scotland
Robert Peston on market reaction to the result
James Cook on the implications for the United Kingdom
Katya Adler on the reaction from Europe
David Cowling on how the pollsters got it so wrong
Newsnight reporters and producers’ rolling election analysis
“In this parliament I will stay true to my word and implement as fast as I can the devolution that all parties agreed for Wales, Scotland and Northern Ireland.”
George Osborne has also been given the title first secretary of state, giving him seniority over other cabinet ministers.
He said the Conservatives had been “given a mandate to get on with the work we started five years ago” and would follow the “clear instructions” of the British public.
Speaking at Labour’s London headquarters, Mr Miliband said he had phoned David Cameron to congratulate him on his victory.
He said he would step down as leader with immediate effect after Labour won 26 fewer seats than in 2010, adding that deputy leader Harriet Harman would succeed him pending a leadership contest.
Labour, he said, needed an “open and honest debate about the way forward without constraints”.
“I am truly sorry that I did not succeed,” he told party supporters. “I have done my best for nearly five years.”
He added: “Britain needs a strong Labour Party. Britain needs a Labour Party that can rebuild after this defeat. We have come back before and we will come back again.”
Announcing his own exit as leader after more than seven years, Mr Clegg said the results – which saw his party reduced from 57 to eight seats – were the most “crushing blow” to the Liberal Democrats since they were formed in the late 1980s.
“This is a very dark hour for our party,” he told party supporters in London. “But we cannot and we will not allow the values of liberalism to be extinguished overnight. Our party will come back. Our party will win again.”
David Cameron has been congratulated on his victory by a number of foreign leaders.
Jean-Claude Juncker, president of the European Commission, said he would work constructively with the new UK government and would consider “proposals, ideas or requests” about the UK’s membership “in a very polite, friendly and objective way”.
An independent inquiry is to look at the accuracy of UK election polls, after they failed to predict the Conservatives’ lead over Labour.