When tomatoes, peppers, melons, and eggplant develop a sunken, rotten spot on the end of the fruit, the cause came long before you found the problem. It’s called blossom end rot, and here is why it happens.
Vegetables need calcium for healthy development. When tomatoes, peppers, melons, and eggplant can’t get enough from the soil, the tissues on the blossom end of the fruit break down. The calcium shortage may be because the soil lacks calcium, or calcium is present but is tied up in the soil chemistry because the pH is too low. Also, drought stress or moisture fluctuations can reduce its uptake into the plant. Another reason is that too much fertilizer causes the plant to grow so fast that the calcium can’t move into the plant quickly enough.