Wash green tomatoes in cool water and drain. Trim off blemishes, then slice into even pieces (rounds, wedges, or thick slices). Peel and slice onions.
Place sliced tomatoes and onions in a large nonreactive bowl. Sprinkle with canning or pickling salt and toss gently to distribute. Cover and let stand for 4 to 6 hours.
After the soak, drain the tomatoes and onions well.
Prepare a water bath canner, jars, lids, and rings. Keep jars hot until ready to fill.
In a large nonreactive pot, combine brown sugar and vinegar. Heat over medium, stirring until the sugar is completely dissolved.
Tie mustard seed, allspice, celery seed, and whole cloves into a spice bag or square of cheesecloth, securing tightly. Add the spice bag to the pot with the vinegar and sugar.
Add the drained tomatoes and onions to the pot. If needed, add just enough water to barely cover the pieces. Bring to a gentle boil over medium heat, stirring as needed to prevent sticking.
Reduce the heat and simmer for about 30 minutes, stirring occasionally, until the tomatoes are tender and translucent and the onions are soft. Remove the spice bag.
Working with one hot jar at a time, use a slotted spoon to pack the tomatoes and onions into pint or quart jars, leaving ½ inch headspace. Ladle hot pickling liquid over the solids, maintaining ½ inch headspace. Remove air bubbles and adjust liquid as needed.
Wipe jar rims with a clean, damp cloth. Apply lids and screw on bands until fingertip-tight.
Place jars on the rack in the water bath canner, ensuring they are covered by at least 1 to 2 inches of water. Bring to a full rolling boil.
Process pint jars for 10 minutes and quart jars for 15 minutes, adjusting for altitude if above 1,000 feet in elevation (see notes).
When the time is up, turn off the heat and remove the canner lid. Let jars rest in the hot water for 5 minutes, then transfer to a towel-lined counter to cool for 12 to 24 hours.
Check seals. Refrigerate any unsealed jars and use promptly. Label sealed jars and store in a cool, dark place. For best flavor, let the pickles cure for at least 2 weeks before opening.