Something called bubble bath urethritis
-- tender inflammation
of the sensitive lining where urine
exits, caused by bubble bath or bath soaps w/ fragrances or other chemicals -- is a common cause.
Ouch! another possibility is a urinary tract infection, especially if other symptoms. A urine test can check for this. Utis are more common in boy babies. Many babies with utis don't cry when they pee.