What is the relationship between Dark Souls and Demon's Souls?
According to the developers, Dark Souls is not a direct sequel of Demon's Souls but a spiritual successor. So the story are not related even though the mechanics are really close, and the game are made by the same director and producer.
From an interview of the game director Hidetaka:
"What we we want to clear up is this is actually not a sequel to Demon's Souls - we're treating this as a brand new game created by the same director and producer," Miyazaki-san told CVG in an interview.
"Again it is created by the same director and producer, so the base concept and themes are very similar. However, the story itself as well as a lot of the game features have been recreated so that we can present this as a brand new title."
Although both games do not belong to the same universe, they share at least a common character (Patches).
It is stated in the beginning of Dark Souls, that in the age of ancients the world was filled with arch trees, and everlasting dragons and was shrouded by fog.
In Demon's Souls, when we first start off, the narrator explains how the fog swept across the land, killing much of humanity in the process. Demon's Souls contains arch trees and dragons.
So, yes, I believe it's in the same timeline, just pre-dating the Dark Souls games. (There are a couple other clues but I suggest you search for them yourself. Discovering lore in FromSoftware games is part of the fun)