“Can’t hold a candle to (insert something or someone here)” means that the subject you’re talking about isn’t nearly as good at something as whatever you’re inserting into the object of that sentence. To use it in a sentence: “James is good at drawing, but he can’t hold a candle to Cindy.”
So where does this idiom come from?
Before electric lights, someone performing a task in the dark needed a helper to hold a candle to provide light while the task was performed–much like a helper might hold a flashlight today.
Holding the candle is, of course, the less challenging role. Someone who is not even qualified to hold the candle is much less competent than the person performing the actual task.