I don't know if there is any scientific evidence either way. I have found that in my case, sore muscles usually means I won't be able to do very well. And don't you need to be at your peak when you lift in order to maximise your gains? So I would imagine it a very, very bad idea training a sore muscle - and you could risk injury.
But if it is for example only sore legs, just don't train your legs that day. Do you keep an exact record of how many reps/sets you perform when you train? I recommend this to help you see when you are having a "good" or "bad" day by comparison with recent entries. You can then ask yourself "why" and it will help you get a deeper feeling for what works for you and what doesn't. Eg time of day, food intake, amount of sleep, last time trained, etc, and you may then optimise your lifestyle in these regards. Just a thought. ...Maybe you are overtraining.