Tomatoes are, in South America, a perennial tender fruiting vine which are grown as annuals in regions where there is frost. As a result of being grown in its non-native climate, accommodations have to be made to optimize yield before the first frost appears. So, pruning is both climate, and variety specific. Opinions are varied as well as to whether you should or not prune the suckers (side shoots), but the varying success people get with the same pruning, or lack of pruning, may reflect other management such as heavy mulching and preventative spraying for fungal diseases.
For indeterminate varieties, which only stop growing once the frost arrives, it is recommended by some that you prune the suckers up to the second set of flowers. However, if they have become too large, then to leave them alone as you risk causing damage to the stems by removal. There is another method of pruning which just removes the growing tip of the sucker. You should also prune back to allow good airflow through your plant to reduce the chance of moisture settling on the leaves and stems which would allow fungal diseases to get a hold. But you need to leave some leaves to cover the fruit to prevent it from sunburn. If you remove too many leaves you remove the part of the plant that creates the sugars that are needed for the fruits and growth.
When you have flowers still forming towards the end of the season, and you can calculate that the fruits will never reach an adequate size or mature in time, you can remove those as well. Removal of flowers will mean that the sugars and growth will be concentrated in the remaining fruit.