Depending on how old the baby is, you might need to pick specific seasons to visit Istanbul. You want to avoid snowy winters and extremely hot and humid summer seasons. The best time for families with kids are autumn and spring.
Istanbul is a very crowded city so you might also want to avoid public transportation or at least minimize it so either stay somewhere central such as taksim, besiktas, ortakoy.