After being promised Hashem's protection and being given a guarantee that he will return home safely Ya'akov wakes from his prophectic dream and takes a neder asking Hashem to protect him, provide him with food and shelter, and ensure that he returns home safely. In exchange, Ya'akov accepts Hashem and promises to take ma'aser from all his income.
Why did Ya'akov take a neder asking Hashem for these protections when Hashem already had promised him that and more in his dream? Furthermore, why is Ya'akov's promise to Hashem in return specifically to fulfill the mitzvah of ma'aser?
The Ramban answers the first question by invoking the principle of "shema yigrom ha'cheit." Ya'akov could not trust in Hashem's promise because he thought perhaps he would prove unworthy. It seems that the neder was not needed to ellicit something from Hashem, but rather for Ya'akov's own psyche, to motivate him to remain steadfast and earn the promise (akin to a nidrei zerizus - Nedarim 7).
R' Simcha Bunim m'Peshischa offers a different answer. There are many ways in which Hashem's promise could be fulfilled. Most of us at least pay lip service to the idea that our earnings come from Hashem. But realistically speaking, we know that without going to work we will not have much in our checking account. Realistically speaking, without a job to give us a sense of security, many of us feel challenged to maintain our bitachon. We acknowledge that our income comes from Hashem, but we much prefer to have him hiding in the wings while we pretend that we are in control and go about our business.
Ya'akov davened for exactly the reverse. Ya'akov knew that Hashem could bestow his blessing in such a way that it would appear that his wealth could accumulate because of his great business acumen, his children would grow up OK because he was a great parent, etc. That type of bracha may make a person feel good, but makes it that much harder to focus on Hashem as the one true source of blessing. Ya'akov did not want that. He wanted Hashem to be present center-stage, evident as his benefactor and source of strength.
I think with this approach we can answer the second question as well. The mitzvah of tzedaka and ma'aser has a unique feature not found in other mitzvos. Normally it is prohibited to test Hashem. However, with respect to these mitzvos Hashem says, "Bechanuni na b'zos." "Test me," says Hashem -- Give tzedaka and ma'aser on condition that I bestow wealth on you and see if it does not happen. I think the reason testing Hashem is permissable here is because it follows midah k'neged midah from the nature of the mitzvah. A miser can horde his riches and refuse to share with others, and in truth, why shouldn't he/she? If riches are the result of personal achievement and labor, why share with others who have not expended the same energy and effort or achieved similar results? But we reject this view. It is not personal achievement or effort alone which are the cause of riches, but Hashem's blessing. By giving money to tzedaka, by seperating ma'aser, we acknowledge that Hashem is the cause behind all achievement and it is not our efforts alone. We call Hashem from the wings and place Him center stage. Midah k'neged midah: If you keep Hashem offstage and think everything is the product of your own efforts, then Hashem responds accordingly and keeps in the background. But if you are willing to put aside your own achievements and acknowledge that Hashem is the one true source of blessing, if you give tzedaka and ma'aser because all the money you earn is a gift from Hashem, then Hashem in turn promises that if he is center stage and running the show then more goodness and blessing will follow.
Ya'akov wished for Hashem's blessing to be come in a way that would be clearly evident as coming from Hashem alone rather than through his own personal effort. Therefore, Ya'akov in turn promised "aser a'asrenu lach", to take ma'aser, to perform the mitzvah which is our way of acknowledging that it's not our efforts, but rather it is Hashem's blessing, which is the source of all we have.