There are a few reasons why this could be happening.  1) It could be due to uneven watering, where the bottom of the tomato is getting too much water, and the top is not getting enough. This can cause the bottom of the tomato to start rotting while the top stays red.  2) Another possibility is that the tomato plant is not getting enough nutrients, which can cause the bottom of the tomatoes to turn brown while the top stays red.  3) It could be that the temperature is too hot or too cold, which can also cause this issue. If you're unsure what's causing it, try checking each of these factors and see if anything seems off.  Once you figure out what's causing the problem, you should be able to fix it and get your tomatoes back to normal!