Sometimes, I do think lying is OK. Really, the only instance I think it is morally wrong to is if you are lying knowing it will hurt someone else. As basic examples, telling someone you don't really want to hang out with that you have other plans that day to spare their feelings is fine, at least in a bubble, but telling someone they are being cheated on out of pure jealousy isn't fine. Obviously there can be surrounding circumstances that further muddy the waters, but in most circumstances I think knowledge and intent is what it ultimately comes down to.
Next time you consider lying, ask yourself if the potential harm your lie causes outweighs the potential benefit of it. To use your example, if you know you're going to do well on that chemistry test and you just want to try and have some additional time for other things, the lie is most likely fine. If you're struggling with the material and your time really would be better suited studying then are you willing to deal with the fall out that may come if you fail the test or don't do well enough to please your parents? That's ultimately your decision.