This is called blossom end rot. Blossom end rot seems to be more prevalent this year. I think the weather conditions, hot and dry, have favored this problem in tomatoes, and peppers as well.
The problem is caused by a lack of calcium uptake by the plants often due to a calcium deficiency in the soil and also uneven soil moisture. You need to try to maintain even moisture levels in your garden soil. It is important to irrigate when the soil becomes dry. A good practice would be to mulch your plants. I use compost or straw on top of a layer of newspaper to mulch my vegetable garden. This holds moisture in the soil longer and also has the added benefit of keeping the weeds down. Often it is the first tomatoes of the season that are hardest hit because the rapid early growth of the plant increases the calcium demand.
There is a product made by Bonide called Rot Stop Tomato Blossom End Rot Spray. This might help with the calcium deficiency. Use according to the label directions.