This could be from a lot of different things. Are you maybe dehydrated? How much caffeine do you drink? Water? Try decreasing caffeine (and alcohol) and increasing the water and see if that helps.
If you've had a risk for an STD, it could be that. It's not a common symptom, but if you've had unprotected sex, testing might be a good idea.
You might have a urinary tract infection. Or an inflamed prostate.
Really, there are a ton of possibilities, and your doctor can help sort it out with testing.