can weight really affect fertility?

my doctors have been telling that if I lose weight getting pregnant will be easier and I'm trying really hard, I have lost a little weight but I wanna know if it's really going to make that big of a difference.