Khatami, a strong Mousavi backer who has denounced the escalating crackdowns on opposition protesters, said the bomb attack was carried out by groups seeking to "further destabilise the crisis".
No direct accusations
In a statement of condolence to Ali Mohammadi's wife posted on Khatami's website, he said the "ugly face of terrorism" was behind the bombing.
But he did not make any direct accusations.
"The dirty hand who did this murder with no doubt was the enemy of Iran," Khatami wrote.
His 1997-2005 presidency was marked by efforts at widening Iran's political and social freedoms.
Rafsanjani's statement, carried by the semi-official ILNA news agency, called the bombing "cowardly terrorism" and a sign of "a new era of intrigue" in Iran.
Rafsanjani, who served as president from 1989 to 1997, has not publicly endorsed the opposition, but has waged political battles against Mahmoud Ahmadinejad, the Iranian president.
The statements by Khatami and Rafsanjani added to the puzzling array of claims and clues following the attack.
Iranian officials have blamed an exile opposition group they claim has ties to the US and Israel.
The US has dismissed the accusation, with Mark Toner, a US state department spokesman, calling it "absurd".
But Ali Larijani, the Iranian parliament speaker, repeated the claims against the US on Wednesday.
"Such filthy actions are easy to carry out but such adventurism will do you no good," the ISNA news agency quoted him as saying in reference to Barack Obama, the US president.
"You have practically promoted acts of terrorism."
The pro-government militia group, the Basij, has also praised Ali Mohammadi as a martyr.
Neither the Iranian police nor the intelligence services have yet reported any leads in their investigation, and Manouchehr Mottaki, the Iranian foreign minister, has stopped short of explicitly accusing Washington of being behind the bombing.
Al Jazeera's Alireza Ronaghi, reporting from Tehran, said the people attending the funeral on Thursday were divided in two groups.
"One group was heading the funeral and those were the people who chanted slogans in support of the government and in support of the allegations made by Iranian officials.
"There was another group of [Ali Mohammadi's] colleagues and close friends, walking behind the first group, and they were only chanting traditional Iranian funeral slogans."
Ali Mohammadi had few apparent links outside the academic community.
The spokesman for Iran's atomic energy agency said he had no involvement in Iran's nuclear programme.
The physicist was not known to have any important roles in the opposition movement, although his name appeared on a university petition pledging support for Mir Hossein Mousavi, the reformist candidate, before last June's disputed election.
Our correspondent quoted one of Ali Mohammadi's close friends as saying that the professor was never a political activist.
"He told me that Ali Mohammadi had very deep reformist tendencies but never mixed it up with his professional character.
Ali Moghara, who heads the physics faculty at Tehran University, said Ali Mohammadi was just a "world famous" physicist who engaged in "no political activity".