I'm going to assume you're asking about the second siege of Vienna in 1683!
The main incentive for the campaign appears to have been the whims of the Sultan Mehmed IV and his new Grand Vizier, Kara Mustafa of the Köprülü family, who were apparently dead keen on umlauts. Kara Mustafa had already been a favourite of the sultan when his predecessor (and adopted brother) Fazil Ahmed Pasha dropped dead after a stroke in November 1676, and he is described as "a courageous and competent subordinate. But he was a poor leader."
After some eventual success commanding Ottoman forces in a campaign against the Russians and capturing the Ukrainian town of Chyryen, Kara Mustafa turned his mind to planning an attack on the Habsburgs. Glory seems to have been his primary motivator. He hoped to avenge the previous Ottoman reverses against the westerners and carve his (and Mehmed's) name into history in the process. The difficulties of taking, much less holding, the Austrian capital paled in comparison to the political and symbolic significance of the act. Mehmed IV was a man acutely aware of his position in history and how he stood in comparison to his ancestors- as such, the framing of the potential capture of Vienna as equal in importance to Murad IV's seizure of Baghdad or Mehmed II's taking of Constantinople appealed to his sense of dynastic prestige. Yes, he had been nominally in command of the victories at Candia and Kamenets, but he yearned for a real triumph of his own that was worthy of his illustrious ancestry. The sultan often busied himself reading extensively in the palace archives, poring over details of previous campaigns. He wanted a grand adventure, and, rather than an incompetent ruler led by the nose by a malevolent subordinate, he was more than likely an active partner in the plan to attack Vienna.
Kara Mustafa has been demonised by his critics as a flatterer and a gratifier who only wanted more money and land, and he was in the event not the best man for the job, but family pride motivated him as much as it did his lord. His adoption into the Köprülü family meant he owed everything to them and he was fanatically dedicated to their name as a result. The taking of Vienna, a prize that had eluded all of the Sultan's predecessors, would heap glory on both himself, the adopted son, and on the family that had taken him in, justifying and rewarding their faith in him. Described as having an extraordinary sense of his own importance by those who met or saw him, and with an apparent genuine contempt for Europeans, he yearned (like Mehmed IV) to avenge previous Ottoman reverses, and the defeat at St. Gotthard in 1664 in particular.
There were good reasons for a campaign in 1683 that backed up the dreams of renown shared by Mehmed and Kara Mustafa. The Habsburgs were preoccupied with France in the west, and they were vulnerable in the east after repeated mishandlings of their Protestant Hungarian subjects which left many Hungarians wondering whether the Ottomans might be a better choice than their current Austrian overlords. More specifically, Vienna itself was, according to Ottoman spies and informers, absurdly poorly defended. Its fortifications were out of date and there was not much of a garrison. Sultan and Grand Vizier were confident it would not prove much of an obstacle once reached.
The reaching was most of the problem. The Danube frontier was by this point dotted with new fortresses that could take weeks to reduce and had ensured that, in the Long War of 1593-1606, neither side had been able to gain a decisive advantage. These forts and the difficulty of taking them meant that time would be against the Ottomans- they knew the dangers and chances of failure that winter sieges held. For this reason, the prevailing wisdom among Ottoman generals was that a campaign against the Europeans should have very limited aims: one or two strategically valuable forts taken that left gaping holes in the Austrian defenses that would allow for future gains to be made. This, however, was not enough for Mehmed and Kara Mustafa. The expenditure of wealth and political capital required for a full-scale campaign demanded a far juicier prize than, say, the bastions of Györ. Only Vienna would do. The eagerness of the Sultan and his Grand Vizier to heap glory on their respective houses, coupled with the genuinely good reasons for laying siege to Vienna, clouded out the military realities which meant the plan was considered foolhardy by the Ottoman military elite, and it is telling that the senior officers were not informed of the campaign's ultimate objective until the army was camped at modern Székesfehévár in Hungary in June 1683.
Wheatcroft A, "The Enemy at the Gate: Habsburgs, Ottomans and the Battle for Europe" (Basic Books 2010)