Bananas are hungry and thirsty. If they "run out" of nutrient when flowering, especially potassium, they will stop setting fruit. They like a deep rich soil with lots of humus. Good drainage and a regular water supply. Fertilise with blood and bone meal and add some sulphate of potash prior to flowering.
Once they finish setting fruit, cut the
flower off the bunch to direct more energy to the fruit.