OF course, when and where are relative pronouns and also they're relative adverbs. As relative pronouns, when stands for a time. Ex: Ramadan is a month when muslims fast.
Where as a relative pronoun refers to a place. Ex: This is the house where I live.