Red Thai chile peppers give pickled corn a kick. Simply slice raw corn into thick coins, let it soak in the pickling liquid for 24 hours, and serve it straight from the jar.
Bring vinegar, 6 cups water, sugar, salt, and bay leaf to a boil, stirring to make sure sugar dissolves. Stir in chiles, and let cool until warm, about 10 minutes.
Meanwhile, cut corn crosswise with a heavy chef's knife into pieces about 1 1/2 inches long (you should get 4 or 5 pieces from each ear). Layer corn and onion in a very clean 4-quart glass jar with a clamped top or a lid and screw-top band. Pour warm vinegar mixture over corn and onion to cover completely (discard any leftover liquid). Leaving jar open, refrigerate until liquid is cool, about 1 1/2 hours, then shut jar. Refrigerate corn at least 1 day and up to 2 days. Serve cold.