Preheat the oven to 400º.
In a small skillet over medium heat melt the butter. Add the onions, garlic and golden brown sugar and sauté until the onions are soft and translucent, 4 to 5 minutes.
In a large cast iron skillet, or any skillet that is ovenproof, lay on the bottom a bed of thinly sliced lemons. Add the caramelized onions atop and spread evenly.
Add the sole in top, salt and pepper generously and sprinkle fresh thyme all over. add the wine around the fish.
Place in the hot oven and bake for 30 minutes.
Remove from the oven and serve the sole with caramelized onions.