Blackening of teeth was practiced in Japan since the Kofun period (3rd century) for health and aesthetic purposes, with the practice dying out in the early 20th century.
Depictions making their way to Danbooru may be artistic errors due to miscoloration by the artist. Characters most likely to be intentionally depicted with black teeth may be kitsune, geisha, or oiran.