Somalia, particularly Mogadishu, has seen a spate of attacks in recent weeks as the country hobbles through long-delayed elections.
Al-Shabaab said in a statement that one of its fighters carried out the attack.
Witnesses said the huge explosion tore through an open area of the Hassan Dhiif restaurant where people had gathered under trees to eat lunch and enjoy the breeze.
"I saw dead bodies of several people and I could not count how many wounded that were rushed to hospital," said one witness, Mahad Osman.
"Some of these people were waiting for their ordered meals to come while enjoying the fresh weather when the blast occurred," he said.
"I saw... shoes, sticks and hats strewn at the scene of the blast, there was also blood and severed parts of human flesh in the area."
Somalia is due to wrap up voting for the lower house of parliament by February 25 under the latest timetable for the elections, which are more than a year behind schedule.
President Mohamed Abdullahi Mohamed, better known by his nickname Farmajo, has been at loggerheads with prime minister Mohamed Hussein Roble over the election delays, an impasse that has Somalia's international backers worried.
Among those running for a seat in Beledweyne is Farhad Yasin, Somalia's former intelligence chief who is now Farmajo's national security adviser.
Somalia's voting process follows a complex indirect model, whereby state legislatures and clan delegates pick lawmakers for the national parliament, who in turn choose the president.
Voting for the upper house concluded last year, while clan delegates have so far elected 159 of the 275 MPs who sit in the lower house.
Somalia's international partners fear the election crisis distracts from the battle against Al-Shabaab, the Al-Qaeda-linked Islamist group fighting the weak central government.
Its fighters were driven out of Mogadishu in 2011 after an offensive by an African Union force, but they still control vast swathes of rural Somalia from where they launch regular attacks in the capital and elsewhere.
The United States issued a statement on Friday calling on Somalia's leaders to complete the elections in a "credible and transparent manner" by 25 February.
"The United States will hold accountable those who obstruct or undermine the process," it said.
Earlier this month, US Secretary of State Antony Blinken announced a decision to restrict visas to current or former Somali officials or others "believed to be responsible for, or complicit in, undermining the democratic process in Somalia".