Consulting with a Dr is the pain has been a persistent issue is the best move along with seeking a professional fitting from a QUALITY bike shop. If there is no obvious signs of damage or injury most Docs will first prescribe Physical Therapy where you will be evaluated for weakness, tightness, potential stability issues, and signs of minor knee related issues. If you cant think of a specific cause or occasion that resulted in the pain it may be that you have a chronic stress related issue to the knee or that training only on the bike without any from of cross training has resulted in weakness in the stabilizing musculature not directly used with cycling. Best of luck.
Mike