Sun, or lack of it, is one of the most common reasons for a poor harvest. Tomatoes need at least eight hours of full sun each day of the growing season. With less sun the plants may get spindly and will produce little fruit. Many garden plants can handle some shade with little adverse effect, but not so for tomatoes. If your plants aren't producing fruit, check their sun exposure. When planted in late spring they may have started in full sun, but as the season progressed the sun's angle changed and they may have ended in shade at the critical time of fruiting. If they're in a pot you can move the pot into the sun but if they're in a garden bed you'll have to make note of it and plant them differently next year.
Tomatoes need consistent soil moisture levels. Too much or too little water can cause the blossoms to fall off the plant, the fruit to split, or blossom end rot to develop. To help with this issue, tomatoes should be planted in well-drained soils amended with organic material and they should be mulched well. The soil shouldn't be allowed to dry out or stay soggy. A consistent moist environment is important.
Blossom end rot usually appears when the fruit is about half its full size. On the bottom of the fruit, the blossom end, a small, water-soaked spot develops. As the fruit grows, the spot gets bigger and darker. It may remain small and dark or it may get black and leathery and cover half of the fruit. Once it develops it cannot be removed or "fixed". It's caused by a calcium deficiency in the plant. Seldom the problem is due to not enough calcium in the soil, though you can help by adding eggshells, oyster shells and other calcium supplements to your soil. The most common cause is the soil drying out during fruiting. With no water uptake from the dry soil, the plant stops absorbing calcium from the soil and blossom end rot develops. The cure is to never allow your soil to dry out.
Another common reason for low fruit production is blossom drop due to temperature extremes. Tomatoes grow best when the day temperatures are between 70F and 85F degrees (21C and 29C) and the night temperatures are above 55F degrees (13C). Plants can handle temporary temperatures outside these parameters but if they are exposed to sustained extreme conditions the blossoms will literally fall off the plant and no fruit will develop. When summer days stay at 90F and above, fruit production will falter. In cool climates if the plants are planted too early, steady nighttime temps below 55F will hinder fruit development. At the height of summer if the night temperatures get above 70F degrees (21C) the same problems will happen.
Like all plants with flowers, tomatoes require pollination. Bees, flies, butterflies, and wind will all help pollination but in the extreme heat of summer all of those pollinators may be reduced. Without pollination fruit won't develop. You can help by hand pollinating the flowers but a better approach may be to plant a variety of flowers near your tomato plants to attract the bees and butterflies.
Fertilization benefits most plants and tomatoes like a boost too, but too much nitrogen early in the plant's growth will give you big, lush, green plants with very little fruit. It's best to limit nitrogen fertilizers early on. A balanced fertilizer (5-5-5 or 8-8-8) is okay at planting but wait until the plants flower before applying more.
Many tomatoes are susceptible to fungal diseases. Just about the time the fruit is getting large and beginning to turn red the leaves begin to turn yellow, then brown and black, and the fruit is left to wither away; Fusarium wilt is a common cause. Over and under watering can cause similar symptoms so that's another reason to maintain proper irrigation methods.
How you water can reduce some problems. Overhead watering on bare soil can introduce problems like early blight, caused by another fungus. When the water splashes on the soil it sends the spores onto the leaves and stems to cause brown and black spots and dead leaves. It can spot the fruit but more often causes problems like sunburn because of reduced leaf cover. Sunscald and sunburn discolors and toughens areas of the fruit. Use an irrigation method like soaker hoses with mulch to reduce these issues.
Rotating crops can also help. Avoid planting tomatoes in the same spot every year, especially if you've had fungal problems. Ideally you want to wait four or five years before planting tomatoes, eggplants, and potatoes in the same spot. Plant other types of crops in the interim and put your tomatoes in a new, sunny bed each year.
Always, always remove infected or diseased plants and throw them away. This is one time you don't want to add plants to the compost pile. Allowing an infected plant to stay in the garden or compost gives the fungal spores and other pathogens an opportunity to infect future plants.
There are also bacteria and viruses that affect tomatoes. Hail and wind can cause damage. If you're having difficulty, take a little time to try and analyze the issue. There are a number of sources for more information about tomato problems. Colorado State University has a good fact sheet: "Recognizing Tomato Problems".
Tomatoes are wonderful plants that have a place in almost every garden. When conditions and gardener actions are good they seem to produce abundant fruit with little work. When an imbalance develops due to weather, nature, or gardener oversight, little fruit develops regardless of the effort.
I know many gardeners who stopped growing tomatoes, particularly in Colorado, because it was hard and didn't seem worth the attempt. With a little extra knowledge and attention, tomatoes can be successful. My 7,500' garden produces tomatoes. It's not always easy, but the fruit always tastes better when you have to work for it.