Yes wet diapers can cause Urinary Tract Infections in both babies, toddlers and adults.
You should not let a baby, toddler or adult sit in a wet diaper for too long and diapers should be changed at least every 2 to 3 hours.
The urinary tract infections from sitting in wet diapers too long can happen in boys as well as girls although girls are more prone to getting the Urinary Tract Infections from sitting in the wet diapers due to the Vagina that is a place where the urine can get back into.