Melt the butter in a large skillet over medium heat. Add the onions, salt and sugar and cook, stirring occasionally, until the onions are golden brown and caramelized, about 20 minutes.
Place 2 slices of bread on a work surface. Top each slice with a slice of cheese. Divide the caramelized onions among the 4 sandwiches. Top with remaining slices of bread.
Heat a large skillet over medium heat. Place the sandwiches in the skillet and cook until golden brown on both sides and the cheese is melted, about 3-5 minutes per side.