According to Asadullah Daulatzai, the spokesman for the governor of Laghman province, the bomb outside a police headquarters building also partially destroyed a nearby madrassa, or religious school.
"The students were wounded by flying glass," he said, adding that "about 20" students were hurt, AFP reported.
Six police officers were also wounded.
The interior ministry confirmed the toll and blamed the attack on the Taliban.
The insurgent group did not immediately comment.
Afghanistan is currently awaiting results of the first round of presidential voting, which took place last month.
Polling was marred by several small-scale attacks claimed by the Taliban, who worked to disrupt the democratic process.