Weather absolutely will affect flowering on any plant. During times of stress (drought or excessive heat) plants will set fewer flowers, so that it may invest more available resources into those reproductive units. If stress continues, the plant will even abort flowers or partially developed fruit. It does this so that it can ensure that at least some of its seed/fruit will reach maturity and become viable. I have that happening in my garden as well. I have a row of pole beans that flowered like mad earlier in the season, but they all fell off and there's not so much as a pod on them now. The plants are still flowering yet, but I don't expect any pods to set. My zucchini and cukes are just as bad. I only got one or two good fruits per vine and the plants went kaput. Its been a tough year.