Pour the sugar into a large nonreactive bowl.
Split the vanilla beans and scrape the seeds into the sugar. Reserve the pods separately.
Stir the sugar and vanilla bean seeds together with your hands, rubbing the seeds into the sugar until they’re evenly distributed.
Add the halved tomatoes and lemon juice and stir until no dry clumps of sugar remain. (If you won’t be water bath canning, you can use fresh lemon juice, but bottled lemon juice is necessary when water bath canning. It provides the proper amount of acidity needed to make the final recipe shelf stable without refrigeration.)
Add the reserved vanilla pods, submerging them in the tomatoes, cover, and refrigerate overnight or up to 12 hours.
If you’ll be water bath canning, prepare your canning station and start heating your water. (See this excellent water bath canning primer from Food in Jars if you’re a canning beginner.)
Pour the contents of the bowl into a medium nonreactive saucepan, scraping the sides of the bowl to get any and all sugary liquid.
Bring to a boil over medium-high heat, stirring to dissolve the sugar as the liquid heats. Continue cooking and stirring frequently until the jam thickens and sets, about 15 minutes. (How to know if the jam is set? It should slide off a spatula or spoon in a thick sheet instead of dripping in loose drops. You can also do the plate test by spooning a bit onto a plate and placing it in the freezer for a few minutes to cool it quickly. Run your finger through the cooled jam to check its consistency.) Reduce the heat as needed if the jam starts to stick and scorch.
Remove from the heat and discard the vanilla bean pods.
Ladle the jam into 2 half-pint jars or 1 pint jar. Leave 1/4 inch headspace if you’ll be water bath canning.
Screw the lids on the jars and process in the water bath for 15 minutes or let cool on a wire rack until the jars are cool enough to handle, then refrigerate.
Unopened water bath-canned jars can be stored in a cool, dark place for up to 1 year. Unopened un-canned jars can be stored in the refrigerator for up to 3 months. Once opened, eat your jam within 1 month.