this sounds like blossom end rot. It is due to inconsistent watering that does not allow the calcium in the soil to be released to the plant. There are sprays to overcome this or you can correct your watering. Water only if the leaves look wilted in the morning.
Then water deeply. If you have trouble telling if the leaves look like they are wilting then stick your index finger in the soil about six inches from the plant. If the soil is dry two knuckles down, then water deeply. Deeply and infrequently is the best way to water for good tasting tomatoes. Usually once every three or four days.