When Balak sends messengers to convince Bilam to curse Klal Yisrael, initially Bilam refuses to come; only after repeated cajoling does Bilam finally agree. Bilam cautions Balak, however, "I cannot transgress the word of Hashem (Balak 22:18)", and later he adds, "Whatever word G-d puts in my mouth, that is what I will speak (22:38)." Bilam promises to follow Hashem's command precisely. And yet, when Bilam sets out on his journey with the officers of Moav, the posuk says that Hashem was angry at Bilam for going (22:22). Why was Hashem angry if He had given Bilam permission to go and Bilam had promised to listen to all of His instructions?
Rav Elchonon Wasserman (Kuntres Divrei Sofrim 1:23-24) explains that while Hashem did not explicitly demand that Bilam not go to Balak, Bilam understood that Hashem really did not want him to go. Nevertheless, Bilam went with the hope that he would be able to convince Hashem to agree to curse Klal Yisrael (Rashi 22:20). Hashem was not angered by Bilam because he disobeyed Him, but rather because he did not care to follow Hashem's true desire (ratzon Hashem).
The navi Yirmiyahu warns that those who sacrifice to Ba'al will be punished for acting in a way that Hashem never commanded, nor spoke of, nor even considered in His heart - "lo tzivisi, lo dibarti, v'lo alsa al libi (19:17)." The Targum there explains that these three expressions refer to three parts of Torah: Hashem's commands are the mitzvos of the Torah, His speech is the words spoken by the prophets, and "considerations of His heart" refer to his true desire (ratzon Hashem) even if it is not expressed explicitly by the Torah or the prophets.
What does this third category include? Rav Elchonon explains that Hashem's will refers to mitzvos d'rabbanan. Although these mitzvos are not expressly decreed by the Torah, they are included in the general command to listen to the chachamim of every generation - "lo sasur" (Devarim 17:11). What's more, sometimes there is a hint (asmachta) to a mitzvah d'rabbanan in the Torah itself. The Ritva (Rosh Hashana 16a) writes that whenever there is an asmachta in the Torah to a mitzvah d'rabbanan it shows even more so that Hashem wanted that mitzvah to be observed. He just left it to Chazal to institute the mitzvah.
But there are other behaviors, besides mitzvos d'rabbanan, that are included within this category of ratzon Hashem. The Ramban comments in several places that sometimes the Torah mentions a general principle but does not elaborate on any specifics related to that principle. The purpose of the Torah is to give an all-encompassing directive which can serve as a guideline in multiple circumstances, a sort of spirit of the law which can inform our behavior in many different contexts. That is the idea behind the concept of "kedoshim tihiyu" (Vayikra 19:2) - to exercise self-control in all mundane activities, not to be overly indulgent in physical pleasures.
Similarly, the word "shabboson" (Vayikra 23:24) teaches that one should act on Shabbos in a way that demonstrates that Shabbos is different than the rest of the week. It is not enough to simply abstain from the thirty-nine biblically prohibited types of work. One must also behave in a manner that is in the spirit of Shabbos. A third overarching principle mentioned by the Torah is the concept of "v'asisa hayashar v'hatov" (Devarim 6:18). This idea demands, in a general sense, that a person act in an exemplary fashion in all of his interpersonal dealings. He should be a model of honesty and fairness; he should go beyond the call of duty (lifnim mishuras hadin) to compromise and to make peace; he should speak pleasantly with other people.
Each one of these three concepts does not legislate any specific actions. But they do give us a general sense of what kind of behavior Hashem desires, what is included in the spirit of the Torah, and they obligate us to live up to that ratzon Hashem.
The Steipler Gaon (Birchas Peretz, Vayikra) points out that there are many mitzvos which are voluntary in nature (mitzvos kiyumiyos), like the offering of certain korbanos, separating extra money for tzedakah, and eating matza throughout the yom tov of Pesach. The purpose of these mitzvos is to give us the opportunity to demonstrate our love for the Ribbono Shel Olam and our desire to fulfill his ratzon.
The Ramchal (Mesillas Yesharim, Ch. 18) suggests that this idea is really the essence of the middah of piety (chassidus). He writes, "The root of chassidus can be epitomized by the statement of Chazal, 'Praiseworthy is the man whose labor is in Torah, and who pleases his Creator - v'oseh nachas ruach l'yotzro,' (Berachos 17a)" One who truly loves Hakadosh Boruch Hu will not be satisfied with simply fulfilling his obligations. Rather, he will look for opportunities to demonstrate his love. He is like a son who adores his father and is always looking for a chance to show his affection. If his father were to barely express his desire for something, even in a half sentence, the son would do everything he could to fulfill his father's desire. That is the attitude of a true chassid. He so desires to please Hakadosh Boruch Hu, to give him a nachas ruach, that he will try to fulfill mitzvos in the best possible way, and to even expand on his obligations in order to demonstrate his love for Hashem.
Too often, when it comes to mitzvos, people are minimalists. They are satisfied with simply carrying out what is demanded of them. As long as they fulfill the letter of the law, they feel that they are beyond reproach. But the true ben Torah appreciates that fulfilling ratzon Hashem involves much more than simply doing what is dictated explicitly by the Torah. When we strive to perform mitzvos meticulously, and we are careful not just with the letter of the law but the spirit of the law as well, we demonstrate our boundless love for Hakadosh Boruch Hu, and we can hope to merit His loving embrace in return.