Here's the layout (the length of the redstone going into the comparator could be altered if you wanted the time of day to be more specific):

As you can see, there is a trapped chest which sends out a signal directly into a repeater, and redstone wire leads into the comparator in order to make the "a" signal strength less than that of the inverse daylight detector (using a NOT gate) at night, so the tnt isn't activated.

In case you didn't already know, the comparator's function is to compare the signal strength in the back, or "a", with the strength of the wire coming from the side, or "b". If the "a" strength is greater than or equal to "b", then the comparator will emit the strength of "a" out of the front. If "a"'s strength is less than "b", however, the comparator will not emit a signal. Since the inverse daylight detector sends out a full strength signal at night, the strength of "a" (less than full strength) will be less than "b" and thus the chest isn't blown up.
Feel free to play around with this concept and create better designs in your own world. Post pics in this thread if you can do better than the simple design that I made.











