Optimize query to filter active IDs for a given day from big table
You could try not exists:

select distinct user_id 
from users u1 
where u1.timestamp='date x' 
  and u1.value='on' 
  and not exists (
      select 1
      from users u2
      where u1.user_id = u2.user_id
        and u2.value='off'
  ); 


If you want more qualified guesses, edit your question with CREATE TABLE statement including keys and indexes.