it could be sunlight, but if that is the problem you cannot very well move the plants, just plan better next year. The other solution would be a high phosphorous fertilizer.

There are some vegetables that don't produce well in heat, just as there are those who do not produce well in cold. Living where I do in a colder region I'm more familiar with the ones with cold problems, so I don't recall if tomatos are one with a heat problem or not.