The force of the blast, in eastern Nangarhar province, destroyed the building's roof, eyewitnesses said.
No one immediately claimed responsibility for the attack.
The blast came the day after the UN said the number of civilian deaths in the war-torn country had reached unprecedented levels over the summer.
According to the UN, 1,174 civilians were killed between July and September, the deadliest quarter since UN records began a decade ago.
Meanwhile, a BBC study which attempted to document every killing during the month of August found a fifth of all those who lost their lives were civilians.