Toss broccoli, cooked bacon, Cheddar cheese, and onion together in a resealable container. Mix mayonnaise, sugar, and cider vinegar together in a separate container until well blended. Refrigerate both until chilled, 30 minutes or up to 1 week.
Just before serving, add dressing to the salad and toss to coat.