Use a toothpick or wooden skewer to poke a small hole through each tomato. This will help them become flavored by the pickling brine.
Set out two clean 16-ounce canning jars with lids. Divide the tomatoes, rosemary sprigs, and garlic cloves among the jars.
In a medium saucepan, combine the water, vinegars, sugar, peppercorns, red pepper flakes, and salt. Bring to a boil over medium-hight heat, stirring occasionally, until the sugar dissolves.
Remove the pot from heat and cool the brine for 10 minutes.
Pour the brine evenly over the tomatoes, rosemary, and garlic in the jar. Put a tight-fitting lid on each jar and place in the refrigerator. Let the tomatoes chill for 2 days before eating. Label and date the tomatoes, then store in the refrigerator up to 2 months.