It depends.
Really, it does. On the lower leves, maybe monarch or lower, you can probably out research the AI by having enough cities and making sure that all your worked tiles have roads on them, which generates commerce, which is used to fund science. The more cities you have, the more pop you have, and the more commerce generated for funding science. Below Regent, the AI has to pay more for the tech commerce wise than you do. Regent is equal, and they start getting discounts at Monarch.
Monarch and above, it's cheaper for the AI to research, so you'll get more techs through trading. On Deity/Sid, it's definitely cheaper to let the AI research, and buy/take the techs from them via trade or war.
But as with All Things Civ, each case is different. Better to give a specific example and then you can get a better idea of how to solve the problem you're facing.