The flowers on tomatoes are very important because they become the fruit, i.e the tomatoes, so the more flowers the more tomatoes. This is show in the image 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 the 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 and the pollinators are not able to fly around as much due to the adverse weather conditions.