In my dreams I have been seeing snakes quite often for the past several months. What does it mean?

It means that you are progressing in your spiritual practice

Often, I get visions of some death and funerals in my dreams. Why is it so? What should I do?

You don’t need to do anything. These visions only mean that your Karmas are vanishing

Do experiences in the dream state contribute to one's vaasanas and future karma, or are dreams only a means to unload the effects of past karmas?

One gets dreams because of one of the following reasons:

The Vasanas of the prior births

The Vasanas of this birth – based on what he sees, hears, reads, experiences etc. in his waking state

Divine intervention

Intervention of evil forces

The scriptures ascribe certain effects (‘phala’) to certain patterns of dreams. The experiences in the dreams don’t add to one’s Vasanas.