I run about three miles a day and have noticed my toenails sometimes fall off. What causes this?

Loose laces. The most common cause is having shoe laces that are too loose (or shoes that are too small). This causes the nail to his the front of the shoe with every step, causing micro trauma - until it eventually falls off.
Trauma to the nail. As a long distance runner, I am quite familiar with this problem (as are most avid runners). This is a matter of the toes (most commonly the 2nd toe, particularly if it is longer than your big toe) hitting the toe box of your shoe as you run. This leads to bruising and trauma to the nail bed, and the nail can fall out. Generally, a new one will grow, but it may not look like the others any more.