Bubbles in urine can be caused by the presence of excess protein in urine or it may also be something as simple as a forceful flow of urine that could make a foamy type of appearance due to excess trapping of air in urine as it contacts water. You will not be able to tell just by appearance.
This can however be established using a dipstick test for urinary protein or a simple urine analysis. For a more precise measurement, you may need to collect urine for 24 hours (microalbumin study - positive between 30 - 300 mg albumin per day).
Diabetes maybe associated with excess protein in urine.
On the other hand, passing actual air bubbles in the urine, is very rare - a condition known as pneumaturia. It is most often caused by a fistula between the bladder and the colon, usually as a result of a diverticular abscess, Crohn's disease or cancer of the colon, bladder or female genitalia.
Go see your doctor. Just in case.
at 2:53 AM on Jul. 13, 2009