The daytime sensors present in Minecraft are used to detect the time of day since they are able to measure the intensity of sunlight and to emit a current signal of equivalent intensity that can be conveyed in a circuit created with the Pietrarossa powder. When paired with special Redstone blocks, they can be used as a twilight switch to detect nightfall. These capabilities make them perfect for crafting various objects, such as an alarm clock, time bomb, twilight switch, and many more.
Steps
Method 1 of 4: Basic Alarm Clock
Step 1. Place a day sensor where you want it
You can also cover it with a block of clear material.
Step 2. Create a redstone dust circuit that connects the sensor to a machine that can be activated by the current produced by the circuit
Step 3. When sunlight hits the sensor, the connected machine will be activated automatically
Method 2 of 4: Time Bomb
Step 1. Place a TNT block wherever you want
Step 2. Hide it well so it won't get noticed
Step 3. Place a daytime sensor on top of the TNT block
Step 4. When sunlight hits the sensor, the TNT block will explode
Method 3 of 4: Inverted Daytime Sensor
Step 1. Place a day sensor where you want it
Step 2. Place your character next to the day sensor, then press the "Use" button
Step 3. The day sensor will turn blue
In this way it will work exactly like a real twilight switch and will only activate when the night arrives.