How can I tell where water is leaking from?
It sounds more like condensation. Warm air is escaping into the attic, where it meets cold air, condenses and forms liquid.

While it could be a leak in your roof, the fact that you're only noticing it at your smoke detector usually points to condensation, otherwise you'd expect to see other signs of water damage (stains on ceiling, spongy feeling drywall, etc.)

You really need to get into your attic to confirm. If it's wet all over, good chance you have a leak, but if there is insulation missing around where your smoke detector is (wires, etc.), then you want to ensure you properly seal the hole and ensure the area is adequately insulated.