Mr Sarkozy spoke warmly of French-US relations
After talks at Mount Vernon, near Washington, Mr Bush praised his French counterpart as "a partner in peace".
Mr Sarkozy earlier received a standing ovation during the first address in more than a decade by a French leader to a joint session of Congress.
He pledged to US lawmakers that France would support the US in Afghanistan.
But he also urged Americans to do more in the fight against global warming and complained that the Bush administration had allowed the dollar to plummet against the euro.
In a press conference later following talks at Mount Vernon, the historic home of inaugural US president George Washington, Mr Bush said the pair had agreed to "work jointly to convince the Iranian regime to give up their nuclear ambitions for the sake of peace".
"The idea of Iran having a nuclear weapon is dangerous and therefore now is the time for us to work together to diplomatically solve this problem," he added.
Mr Sarkozy told reporters: "It is unacceptable for Iran at any point to have a nuclear weapon."
But the French leader emphasized that Iran was entitled to develop civilian nuclear energy, which Tehran argues is the sole aim of its programme.
The BBC's Justin Webb, in Washington, says Mr Sarkozy has taken on the mantle of the former UK Prime Minister Tony Blair in the affections of the US.
It is a stark contrast to the frosty relations under Mr Sarkozy's predecessor, Jacques Chirac, he adds.
At Congress earlier, the current resident of the Elysee Palace was cheered for more than three minutes before he even began his 45-minute address.
He delighted his audience by saying: "Let me tell you solemnly today, France will remain engaged in Afghanistan as long as it takes, because what's at stake in that country is the future of our values and that of the Atlantic alliance."
Mr Sarkozy, 52, who was elected in May, said he wanted France to "resume its full role" in Nato's military command structure after several decades outside it.
He also urged Americans to "stand alongside Europe in leading the fight against global warming".
And he raised concerns over the dollar's fall against the euro, warning "monetary disarray could morph into economic war" and "we would all be its victims".
Mr Sarkozy devoted much of his speech to expressing gratitude for US heroism on French battlefields in World War II, and to praising American values, spirit and culture.
"America liberated us. This is an eternal debt," he said, adding: "I want to tell you that whenever an American soldier falls somewhere in the world, I think of what the American army did for France."
Analysts say Mr Sarkozy's warmly-received visit went a long way towards achieving his promise to "reconquer America's heart", which he declared upon his arrival on Tuesday.
Relations were strained in 2003 when France opposed the US-led invasion of Iraq - and French fries were renamed "freedom fries" on Congress canteen menus.
At a White House dinner with Mr Bush on Tuesday, Mr Sarkozy said differences over Iraq should not weaken their alliance and Mr Bush agreed.
The French leader, who spent the afternoon with Mr Bush while on holiday in New England in August, is widely known back in France as "l'Americain" for transatlantic leanings.
In 1996, many US lawmakers boycotted an appearance by Mr Chirac at the US Congress to protest against France's nuclear testing in the South Pacific.