How to convert temperature to an ON-OFF state
Figure 1. A bimetallic strip thermostat provides on-off switching at a user defined setpoint. Source: Science 2012.

Your question is very vague and it is not clear (1) what the application is, (2) how large the sensor can be, (3) how precise a switching point you require, (4) whether hysteresis (difference between turn-on and turn-off point) is required or acceptable, (5) what the operating voltage is, (6) the switching current capability and (7) whether you are looking for a digital solution or what.

You could build a simole circuit using just a thermostat of the type used in home heating temperature control. The principle of operation is shown in Figure 1 but in practice they are a little more tricky and use a toggle action so that once tripped the contacts open or close very quickly to minimise arcing on the contacts.