Does cycling make one's knees stronger?
The key point in your question is I get on the bike and ride hard.

There's nothing wrong with riding hard, but it sounds like you're riding too hard for your knees to be happy.

Since you like doing weights, I suspect that you like to push the pedals hard, and this is causing the problem.

Bike fit issues can cause knee soreness, but they also tend to have other symptoms also, such as back soreness or neck pain.

The solution is to train yourself to ride with higher cadence, ie to spin the pedals faster. Aim to get into the 90-100 rpm range, or even higher.

There are many questions here tagged cadence, the most useful for you may be What is the optimal cadence? and will increasing cadence ability hurt my climbing strength?.