Peel cucumbers and slice very thin, about 1/8 inch. Slice onion thinly if using.
Place cucumber slices in a colander and sprinkle with about 1/2 teaspoon salt. Let drain 20 to 30 minutes.
Rinse cucumbers under cold water, then pat dry or spin dry.
Whisk sour cream, sugar, white vinegar, dill, salt, and pepper until smooth.
Toss drained cucumbers and onion with dressing. Cover and refrigerate at least 12 hours, preferably 24 hours.
Toss again before serving cold and adjust seasoning if needed.
Notes
Salt and drain the cucumbers first so the salad does not turn watery. Slice cucumbers thinly so they absorb the dressing evenly. Chill for at least 12 hours for the best flavor. Stir before serving because the dressing settles at the bottom.