When did firearms begin to defeat traditional knights and cavalry?
Early guns/hand cannons were awful and nearly as likely to blow up on you as to fire, and even so were very inaccurate.
I know it was a process of gradual improvement in firearms, with firearms used alongside traditional knights and cavalry (often with firearm troops protected by Pike-men from cavalry charges), but when did forces equipped with guns begin to truly become superior?
The movement away from heavy, lance-armed cavalry (which I am assuming is what you mean by "traditional knights") was actually caused more by changes in cavalry weapons, rather than an increase in the effectiveness of infantry weapons.
The biggest change to cavalry warfare and the subsequent downfall of heavy cavalry (1) came with the invention of the pistol and the ability of cavalry to be armed with firearms. Pistol armed cavalry, or "Raitars" began to be used by German, Dutch and Swedish armies in the late 1500s.
Raitars initially used the pistol as their main weapon, and employed the “Military Caracole”: troops of cavalry – as much as twelve deep – would advance within pistol range, the front line would shoot, peel away (ie caracole), return to the rear of the formation to reload, while the 2nd line move up and shoot, caracole, etc etc. This tactic was used in combination with, not in place of, heavy cavalry. The light Raitars were used to break up enemy pike formations, while the heavy cavalry (lancers) protected them/intercepted the opposing sides cavalry.
Once the pike formation was broken up the heavy horse could charge home against the infantry. So a combination of pike and musket was no guarantee of protection vs cavalry. If opposing cavalry charged the Raitar they were meant to use their speed (since they had less armour and moved at a speed of less than a gallop, so their horses would not be tired) to get away (although that did not always happen, for example at the Battle of Mookerheyde (part of the Eighty Years War) 400 Spanish Lancers (heavy cavalry - closer to "traditional knights") charged 2000 Dutch Reiters who didn’t move in time, and routed the lot).
Gustav II Adolf (the king of Sweden during the 30 Years War) was not a big fan of the military caracole. He preferred to use his cavalry aggressively – like the Polish heavy cavalry he faced – and had them charge in with sword. But that is not to say he removed their pistol from them. Rather, the goal was to have the cavalry charge, pistol in hand, fire one shot at almost point blank range (to break up the opposing sides charge), and then fight hand to hand with swords. This tactic was very effective against lancers, and its use by the Dutch in the Battle of Turnholt (1597) is often considered a reason for the end of the use of lancers by the Spanish. You could argue this was the end of the use of "traditional knights" - heavy horse armed with a lance as their primary weapon no longer had a place on the European battlefield.
Cuirassiers, complete with their pair of pistols, continued to be used up to, and after (but with less importance) the Napoleonic wars. The pistol remained a secondary weapon, used alongside the sword to give the cavalryman more flexibility in close fighting.
(1) I say the downfall of heavy cavalry, when a quick search of Google will clearly show that "heavy cavalry" had a place on the battlefield for hundreds of years to come. However, this "heavy" cavalry - like the French Cuirassier - is fundamentally different (both in terms of equipment and tactics) from "traditional", lance armed and armoured heavy cavalry. Heavy cavalry of the 1800's is closer to armoured light cavalry than it is to traditional heavy cavalry.
Sources:
Cavalry: the History of Mounted Warfare by John Ellis.
Tactical Evolution in the French Army, 1560-1660. John A. Lynn
I'd venture to say that Gustavus Adolphus's reign would signal the rise of musketmen and the usage of firearms as a main offensive weapon. Adolphus pioneered many tactics, most importantly the volley. When three lines of men fired at once, it could easily decimate an enemy line. Once the muskets were outfitted with bayonets, they could actually defend themselves at close range, at which point pikemen defenders were less necessary. This would have been from the mid-1840s (the Thirty Years War) all the way to the early 1700s. After that point, musketmen became the primary offensive infantry unit.
I think you're misunderstanding the process. Majority firearm-armed armies developed fairly late in European history, post 1650. Prior to this, majority pike-armed infantry had been the norm. Some firearm-armed soldiers had supplemented these pike formations, but the focus was on the pike.
Why did they supplant armored noble cavalry? Well, if you're a man-at-arms, your only chance against pike-armed troops is to dismount. Men-at-arms had always done this at times, so it wasn't anything new. Because you've had a decade or so of military training, you're going to be the master of any pikeman in a one-on-one fight. But precisely because they aren't nearly as well trained or from a small and privileged classa, it's going to be possible to recruit way, way more pikemen than men-at-arms, and at a similar cost.