“Why didn’t they do something about it?” he tweeted, adding that Mr Obama had been told about it before the vote.
It follows pressure on Mr Trump to cancel Monday’s talks with Russia’s Vladimir Putin following the indictment of 12 Russians on Friday.
Russia denies allegations of hacking.
Mr Trump is due to meet Mr Putin in the Finnish capital Helsinki.
Russia said it was looking forward to the meeting.
“We consider Trump a negotiating partner,” said Kremlin adviser Yuri Ushakov. “The state of bilateral relations is very bad. We have to start to set them right.”
However the hacking allegations have sparked a heated war of words between Washington and Moscow.
US Deputy Attorney General Rod Rosenstein insisted that “the goal of the conspirators was to have an impact on the election”.
But Russia’s foreign ministry said the claims were a “heap of conspiracy schemes” intended to “damage the atmosphere” before Monday’s summit.
It said there was no evidence linking any of the dozen officials to hacking or military intelligence.
What are the allegations?
The 11-count indictment names the Russians defendants, alleging they began cyber-attacks in March 2016 on the email accounts of staff for Hillary Clinton’s presidential campaign.
They are accused of using keystroke reading software to spy on the chair of the Democratic National Committee (DNC) and hack into the party’s computers.
Mr Rosenstein said the conspirators used fictitious online personas, including “DCLeaks” and “Guccifer 2.0”, to release thousands of stolen emails.
They are also accused of stealing the data of half a million voters from a state election board website.
What pressure is there to cancel the talks?
During a joint news conference with UK Prime Minister Theresa May on Friday, Mr Trump said he would “absolutely” ask the Russian president about alleged election meddling.
But top Democrats have urged him to cancel the planned summit altogether following the indictment.
“President Trump should absolutely cancel this meeting with Putin on Monday,” said DNC chairman Tom Perez. “He is not a friend of the United States.”
“President Trump should cancel his meeting with Vladimir Putin until Russia takes demonstrable and transparent steps to prove that they won’t interfere in future elections,” said Senate Democratic leader Chuck Schumer.
On the Republican side, Senator John McCain said the summit “should not move forward” unless the president “is prepared to hold Putin accountable”.
What’s the big picture?
Special Counsel Robert Mueller is investigating US intelligence findings that Russians conspired to sway the 2016 election in Mr Trump’s favour.
As of Friday, the inquiry has indicted 32 people – mostly Russian nationals in absentia – as well as three companies and four former Trump advisers.
None of the charges allege Trump advisers colluded with Russia to interfere with the presidential campaign.
Former National Security Adviser Michael Flynn and George Papadopoulos, a former foreign policy adviser, have pleaded guilty to making false statements about their contacts with Russians.
Former Trump campaign chairman Paul Manafort and his deputy Rick Gates were charged with money laundering relating to their political consultancy work in Ukraine.