We should perhaps first note that vampires are hardly the only creatures that can not stand sunlight; it is a common attribute among mystical creatures that they only appear at night, and that some of them die in sunlight (we can take as examples Grendel of Beowulf, and the Chinese jiangshi, a creature that originally was a reanimated corpse that died when exposed to sunlight, but has acquired more attributes of Western vampires in modern lore).
This general association with the night seems to have been a feature of the early folklore vampires, one of the few aspects that survives into the modern vampire (in folklore, the vampire is a dirty, wild, bloated thing, governed by primal urges; they seem more akin to zombies than Count Dracula). It also featured in the vampire works that saw a huge boom in the early 19th century, such as Byron's The Giaour, in which the titular creature is doomed to walk the earth at night and drain the blood of everyone in his family.
This also illustrated why, even if the step from "only appears at night" to "dies if exposed to sun" is not a long one, it took a while to take it: early vampires tended to be cursed to walk the earth in tragic isolation. For someone cursed like that, having such an easy way to kill themselves was obviously not a useful trait. In stories where vampires were antagonists (more or less monstrous), having them be killed off by something as ordinary as sunlight would easily be seen as anti-climatic; far better to have a showdown with fire or wooden poles.
I have checked two books in Swedish about vampires:
- Katarina Harrison Lindbergh's Vampyrernas historia, an accessible general history. She does not spend much time on the sun motif, but notes that it is indeed present in the folklore.
- Anna Höglund's Vampyrer, based on her doctoral thesis. Much more scholarly, but sadly lacking a useful index. It does give many interesting perspectives on how the vampire mythos developed in the Western world. I could, however, not find any discussion about this particular aspect, perhaps because it does not seem to carry the same amount of significance as other aspects.