Hillary Clinton said plans to elect leaders and adopt a constitution before August were "ambitious".
But she said the mandate of the UN-backed interim government would not be extended any longer.
Somalia has endured more than two decades of civil war and famine.
Representatives from many Somali factions are attending the London conference, but the Islamist group which controls much of the centre and south of the country is not invited.
The UK has described Somalia as the "world's worst failed state" but said it needs a "second chance".
Mr Cameron told the gathered leaders, who included Nigerian President Goodluck Jonathan, Ethiopian leader Meles Zenawi and UN chief Ban Ki-moon, that the world would pay a high price if it ignored the plight of Somalia.
"In a country where there is so little hope, where there is chaos and violence and terrorism, pirates are disrupting vital trade routes and kidnapping tourists," he said.
"Young minds are being poisoned by radicalism, breeding terrorism that is threatening not just Somalia but the whole world. If the rest of us just sit back and look on, we will pay a price for doing so."
During his speech, Somalia's President Sheikh Sharif Sheikh Ahmed called for an end to the arms embargo, saying: "We're looking for security. We're scared of tomorrow."
Yoweri Museveni, the leader of Uganda - which has provided the bulk of troops for African Union (AU) forces in Somalia - told the gathering African solutions to African problems worked best.
On Wednesday, the UN Security Council approved a resolution increasing the number of AU troops in Somalia by 5,000 to more than 17,000. Council members also agreed to extra funding for the mission and to extend its mandate.
'No Islamist negotiations'
They have foiled a number of kidnapping attempts in recent months but attacks continue - and have been staged further from the shore.
The UK has also said it cannot rule out sending more military advisers to boost its small team currently assisting Ugandan forces part of the AU mission.
Kenya has also sent troops into Somalia to tackle al-Shabab, blaming the group for a number of kidnappings on its territory last year. Its forces will now be absorbed into the AU force following the UN resolution.
UK Foreign Secretary William Hague, who visited Somalia earlier this month, says he is "realistic" about what can be achieved in a single day but a more stable Somalia would benefit the region as well as the UK.
Somali leaders have said its challenges cannot be solved by military means alone and a parallel focus is needed on boosting humanitarian aid, education and law and order.
Somali Prime Minister Abdiweli Mohamed Ali told the BBC that his country was at a "crossroads" and needed a massive injection of money.
"It is at a very critical juncture in its history," Mr Ali said. "We are moving from an era of warlordism, terrorism, extremism and piracy and we are moving into an era of peace, stability and normalcy.
"Twenty years of lawlessness, violence and chaos is enough. Somalis are ready to move on."
Despite being forced out of the capital, Mogadishu, last year, al-Shabab has continue to stage suicide attacks in the city.
The BBC's Mohammed Dhore in the Somali capital, Mogadishu, says security is extremely tight in the city because of the conference, with more than 50 roadblocks compared to the usual five.
Union Jacks are also flying at major road junctions and government buildings, he says.
Hillary Clinton US secretary of stateFor decades, the world has focused on what we could prevent from happening in Somalia - be it conflict, famine, or other disasters. Now we are focused on what we can build”
Islamist insurgents who have been fighting the internationally recognised government since 2007 have said the London conference was "another attempt" to colonise Somalia.
"They want us under trusteeship and we will not allow that. God willing we will face the outcome with full force and stop it," a spokesman for al-Shabab, Ali Mohamud Rage, said.
"A stronger America failed and all these Africans failed and we say you should not waste your time, you will lose. We also tell them not to waste their resources."
During her conference speech, Mrs Clinton said the US would never negotiate with al-Shabab, but said Somalia was at a critical point to make progress.
"For decades, the world has focused on what we could prevent from happening in Somalia - be it conflict, famine, or other disasters," AFP news agency quotes her as saying.
"Now we are focused on what we can build. The opportunity is real," she said.
Somalia's tragedy in numbers
- 21 years of conflict
- 12,000 African Union peacekeepers, to be increased to 17,731
- Despite the end of the worst famine in 60 years, 2.34m people still need food aid
- Close to 2.5m people have been forced from their homes - 27% of the population
- Somali pirates are currently holding 10 ships and 159 hostages, at a annual global cost of almost $7bn (£4.4bn)