I just recently heard that the British Navy was exempt from sailors having to buy their commissions to raise their ranks. Why is this the case with the navy and not the army? Did it lead to a more merit based command structure? Or did you have to be born into the “right” family to reach the admiralty?
I can't speak as to the specific reasons for why the Royal Navy specifically chose not to require its officers to purchase commissions, unlike the British Army. But as to the latter parts of the question, I think I can give a decent answer. In short, yes, broadly speaking it led to a fairly merit-based system, but also, being born into the right family certainly helped for making rank. (I should add that I'm speaking generally of the late 18th/early 19th century, as that's what I'm most familiar with)
But it wasn't just reaching the admiralty that being born into the right family helped with. From the very start of a young officer-to-be's career, patronage was important. An aspiring lieutenant needed to be at least 20 years old and have spent at least six years at sea in order to take the necessary exam. So, if you wanted to take the exam as early as possible, a boy needed to be aboard a ship by the tender age of 14 (and the median age that future officers began their service was indeed 13-14, though falsification of birth certificates to test early was not uncommon). Being assigned to a ship as a midshipman was the prerogative of that ship's captain. So having connections to a particular captain was certainly useful in beginning a career. And the books could of course be cooked, with known cases of boys being falsely entered into ships' rolls without ever having set foot on board.
But those were the exceptions. By and large, the rules were followed and the system tended to produce fairly experienced lieutenants. In their six years at sea, they would learn seamanship and navigation firsthand. At the end, they faced an exam that consisted of a trio of captains throwing questions at them to test their ability to command a ship. They were expected to have a thorough knowledge of rigging and handling, as well as pretty advanced mathematics so as to calculate tidal conditions and a ship's position. Some questions were fairly broad and open ended, for example "An enemy is observed; give orders for clearing your ship, and make all the necessary preparations for engaging."
Assuming a young sailor passed his exam, he then needed to wait for a commission (in most cases this took less than a year). This was another time when patronage helped, and indeed a captain could even make a midshipman an acting lieutenant prior to taking the exam. And it continued even after an officer received his commission, for promotion to commander and captain was aided by being mentioned in despatches by the captain, and depended on what assignments the lieutenant was given. The majority of commissioned officers were not so lucky, and never were promoted beyond lieutenant.
All that said, it should not be thought that the Royal Navy of this era was wholly dependent on aristocratic familial connections. Most officers were the sons of what we today would probably call the the middle-to-upper-middle classes - their fathers were merchants, bankers, clergy, lawyers, and of course, military officers (like does beget like, and around a fifth of naval officers were the sons of naval officers). Only 4% came from the aristocracy (for these purposes, those with titles) and less than 20% from the landed gentry. So they were generally not from the poorest rung of society - less than 10% came from the working class. Promotion seems to have been spread fairly proportionally, with the exception of that last category - those from the lower classes were much less likely to progress beyond lieutenant, even if they did manage to achieve a commission. There was probably a significant degree of social stigma, here - a commissioned officer was expected to comport himself as a gentleman, and if his behavior betrayed 'lesser' origins, it would probably hurt his chances. But by and large, as long as you could behave reasonably well in the wardroom, competence as a sailor and an officer does seem to have necessary for promotion.
I've probably gone on for long enough, but as for your last question - whether being in the right family meant you'd reach the admiralty - making admiral was actually done purely by seniority. Once you made captain, all you had to do was live long enough for a spot to open up above you. So if you checked the above boxes - your family having some sort of an in with a captain to get you aboard a ship as a teenager, managing to pass the lieutenants exam, and not getting stuck at lieutenant, you could indeed hope to join the admiralty one day! But they were some pretty tough boxes to check.
Source: Wilson, Evan. A Social History of British Naval Officers, 1775-1815. NED-New edition. Boydell & Brewer, 2017. http://www.jstor.org/stable/10.7722/j.ctt1kgqswg. (If you're interested in the topic, I highly recommend giving this a read, I honestly could not put it down)