@missingrosie
One thing that effects whether tomatoes flower is nitrogen. Too much nitrogen can stop tomato plants from flowering, although it does increase the growth of leaves. Not sure where I learned this but I plant my tomatoes in soil that has plenty of homemade compost, then I might do a foliar feeding of Alaska fish fertilizer as they become established. But not until after they start producing add a plop of extra compost at the base of each plant and a couple more foliage feelings throughout the season as they are stressed when producing fruit.