Benadryl can certainly help calm the itchiness from inflammation caused by head lice biting the scalp. However, it is not known to kill the lice, just to relieve one of the symptoms.
Benadryl is a trading name for an antihistamine called Diphenhydramine. Antihistamines work by blocking your body's natural reaction to a harmful substance. In the case of head lice, biting lice cause infection to the scalp. The body responds by making the infected area itchy.
Antihistamines such as Benadryl can block the itchiness from inflammation, but they won't kill the lice, and they won't stop the itchiness caused by live lice crawling on your scalp.
The best time to use Benadryl would be if the scalp still itches after the lice have definitely all been eliminated. Of course, while side effects are rare with Benadryl, it is always best to check with your doctor before using medication.