Can anyone explain to me, what the benefit of a specific gun deck was?
Sure, larger vessels had to stack their guns in order to fit more on the ship and heavier guns had to be placed farther down in the structure, but why did frigates (2 deck vessels) use 1 gun deck and ditch the guns from the upper deck?
What was the definitive benefit of keeping the guns in their own deck?
I've written about this and similar topics before. A lot of what I'll say below is adapted from this older answer as well as this one which is specifically about frigates.
The tl;dr is that for a given set of ships built to carry the same gun armament, it was in general more preferable during this period do build ships with a single, longer gundeck than two or three shorter gundecks. The classic example of this, which is not a frigate, are the stubby English 80-gun three-deckers which compare unfavorably to the French 74-gun two-deckers that became the fairly standard third-rate ship designs throughout the period I study. The principles are the same, though.
So, first off, let's consider how a ship was constructed and run in the Age of Sail, and how fitting a given number of guns into a ship affects its speed, handling characteristics, etc.
Very broadly speaking, to fit a given number of guns into a ship, you have two choices: you can make the ship longer, or you can make it taller.
Guns need room to be trained forward and backward, and cutting gunports into the side of a ship does weaken the hull structure to an extent (and means you have holes where water can come in), so you can only pack so many guns next to one another on each side of a ship; as you add guns, the whole ship might have to get longer. But longer wooden ships flex more in the sea than shorter wooden ships do, especially with the construction techniques available at, say, the start of the 17th century.
Another option for putting more guns on a ship is to add more decks for guns. If you add more decks for the guns, you can add more guns higher up in the ship. But the drawback to adding more guns higher up in the ship is that guns are heavy, and if you build a ship with a lot of gundecks that has a lot of heavy guns high up, bad things can happen, especially before people understood metacentric height or do any kind of tank modeling. Even without the ship completely capsizing, too many heavy guns high up can make lower-deck gunports unusable in a heavy sea or in winds where the ship is heeling over at all.
There's also the related issue that, broadly speaking, a ship that's longer will be faster and handier to sail than one that's shorter. The fundamental determinant of a ship's speed (assuming we're talking about a displacement hull) is tied to the length of the hull. There's a formula for this: HS = 1.34 x √LWL; or to say it in English, hull speed is equal to 1.34 times the square root of the length of the waterline. In practice, though, most modern sailing hulls are capable of exceeding this -- the ratio is tied to the bow wave and stern wave a hull generates, and as a boat heels or exposes different parts of its hull to the water, those waves and their interactions can change. It's kind of useful to think of it as a minimum maximum, but the overall lesson is that as a hull gets longer, its potential speed gets greater. (Feel free to click here for a more technical discussion.)
Length and handling characteristics are also related because one of the ways a sailing ship turns itself is by using different combinations of sails on its different masts, along with its rudder, to move the head of the ship around. If you consider a ship to be a box with forces acting on it, the longer the box is, the more widely separated the masts can be and the greater leverage you get from them. (This is why bowsprits are standard for ships at the time -- not only can you use headsails to point closer to the wind, but you get a larger leverage arm on the hull of the ship.)
So let's talk about where the frigate hull type originated.
It's important to note that the term "frigate" had different meanings at different times in the British navy. During the civil wars of the 1640s, the parliamentary forces fought mostly with armored merchantmen and did not make much use of the "great ships" that Charles I had built. After the third civil war started in 1649, English shipping was attacked by fast cruisers from Dunkirk and other Channel ports. The Dunkirker ships were called "frigates," but were very different than what we think of as classic frigates of the Age of Sail; they were very small, lightly built, with very minimal armament and large crews. They were designed essentially for commerce raiding and high-speed operations against weak targets.
The word, though, became applied to bigger ships that the English navy would build, and also became a verb ("to frigate" meant to build long, low ships) and an adjective, so it loses a bit of descriptive meaning. In any case, in 1650 the English navy launched the Speaker, a two-gundeck ship originally built to carry 44 long guns and carrying 60 by 1655. The Speaker is arguably the ancestor of the two-decked ship through the 1750s.
The reason why I'm bringing this all up is that the shift from the shorter, handier ships of the Elizabethan era to these longer, lower ships with broadside armament meant a change in tactics, where ships would no longer approach and fire off all their guns before withdrawing, but would rather lie in line of battle and batter each other.
The drawback of building ships to this model is that the second (and in some cases, third) gundeck led the English to over-arm the ships, which made them top-heavy. This led to problems of the lower gundecks being submerged in any kind of weather, and also the ship heeling and not being stiff enough to get the full driving force out of its sails. New ships were sometimes "girdled" with extra planking at the waterline in an effort to increase buoyancy; this did not improve sailing qualities. These defects were serious in the North Sea and worse in the Atlantic, and were compound when Parliament became involved in ship design and voted in the 1690s money to build ships to an (unrealistic) specified tonnage and gun rating (80 guns at only 1,100 tons), which proved to be inadequate in practice.
Part of the problem with the three-decker 80-gun ships is that they were not only short, but also carried smaller guns than contemporary designs from other navies. Part of the solution to instability of multi-decked ships was that ships would carry their largest guns on the lower decks, so the 80-gun ships of the 1690s carried large guns only on the lower deck, with lighter guns as they went up. Other European navies built two-deckers that could carry more powerful guns. The result was that an English 90 was the same size and weight of broadside of a Spanish 80; a Portuguese 80 had half again the broadside of an English 80; and so forth.
So why exactly did British ships keep being built to a smaller standard than comparable French, Spanish, Dutch, Portuguese or other navies' ships? This was not a technical failing, but a political and financial failing. The Navy Board and the Ordnance Board knew the limits of what Parliament was likely to approve of, and the period between say 1699 and 1740 was one when Parliament tended to pay attention more to raw numbers of ships and not the size of them, or their fighting qualities. Related to this is that the Surveyor of the Navy from 1715 to 1749, Sir John Ackworth, feuded with captains to an extent; the fact that he wanted to improve ship designs by reducing top-hamper that often included the captains' and admirals' cabins may have been related to this feuding.
Even when a new Admiralty administration took over in 1744 with the charge of drawing up a new Establishment, specifically tasked to replace the stubby three-decker 80-gun ships with a two-decker 74 design, there was no major change until after the two battles of Cape Finisterre. In those engagement, the British took as prizes several French ships, including the new French two-decker, 74-gun Invincible, which caused a sensation in Britain; Invincible was 50 percent larger than the British third-rate 70s, and had a broadside 75 percent heavier. The British could build ships to this size, but the barrier was cost, and specifically the inability to this point of the Admiralty to convince Parliament to appropriate the funds. But the experience of capturing those ships, plus momentum leading to the outbreak of the Seven Years War, allowed the navy to be released from its peacetime spending limits and to construct a navy comprised of ships along the French line; that is to say one based on two-deck 74s.
To return back to frigates, then: The shipwrights of the 1740s were comparing French designs with older British designs, such as the yacht Royal Caroline, and were building cruisers with 11-12 gun ports per side. These were initially built with a 22-24 gun battery of 9-pounders, and became larger over time, with 28-gun 9-pounder frigates being replaced by 32-gun 12-pounder frigates and the very large 36-38 gun 18-pounder frigates by the 1770s, in time for the first American wars.
To put those changes in perspective, it's useful to examine the change in armament of the ships. A 22-gun 9-pounder frigate would throw a broadside weighing 99 lbs (11 guns/side * 9 pound balls). The 32-gun 12-pounders would throw almost twice as much iron per broadside (192 lbs), while the 38-gun 18-pounder would throw 342 lb at once. All these ships were built with the idea in mind that they would be fast, weatherly and carry enough stores for a long cruise.