The flowers on tomatoes are very important because they become the fruit, i.e the tomatoes, so the more flowers the more tomatoes. I show this in the image left, where the spent flowers have become baby green tomatoes with some yellow flowers at the end of the branch, which will also become fruits.
Poor pollination can cause a lack of tomatoes. The flowers need to be pollinated to produce the tomatoes, and this is more of a problem for tomatoes grown indoors in greenhouses and poly tunnels. Outside, nature does this by pollinating insects, such as bees. It is important to open greenhouse doors, windows and vents to let the bees in to do their work. Commercial growers with large poly tunnels and glass houses will import bees to pollinate. I have seen commercial growers in Iceland growing tomatoes in the depths of winter, utilising the thermal underground heat, and importing boxes of bees to fly around and pollinate.
A lack of fruit can also occur during poor a summer if it is persistently wet and cold. The pollinators cannot fly around as much because of the adverse weather conditions.