Yes your baby or toddler can contract a urinary tract infection if sitting in a wet diaper longer than needed.
Always check your baby or toddlers diaper at least every 2 hours to find out whether it needs changing.
Not to mention if diapers aren't changed often enough it can lead to your baby getting a huge diaper rash that is very painful.