Use peer modifier, like that:

  // Add `peer` to the element which state you want to track
  <input type="checkbox" checked class="peer" />

  // Then use `peer-*` modifiers on the target element which style you want to change
  <div class="peer-checked:text-red-500">Sibling</div>

Playground link

More info in the docs as always