A recent pull of a ceiling fan light chain caused the chain and its connector to came completely out. Is there an easy way to reconnect the chain? Does the electricity need to be turned off completely to avoid a risk of electrical shock?
If the chain is broken inside the housing where you can't see it, you will have to disassemble the lower light cover on the fan if so equipped(usually 3 small screws). Definitely turn off the power to the fixture and always double check with a voltage tester to confirm power is off. It is not uncommon for the chain to break or actually pull out of the switch assembly. Until you determine the extent of the problem, you can't plan the fix. If the chain is broken at a ball link, a simple snap link my solve your problem. If it is pulled completely out of the pull switch, then you will have to remove the wire nuts and switch and get a replacement, usually available at any hardware store. Reassemble, carefully tighten the new wire nuts, a safety wrap of electrical tape around the wire nuts and put cover back on. It is actually a very simple fix if you have any experience with electrical repairs. CAVEAT. Be sure power is off before working with any wires. Good luck.
If you can't fix it (or take this as an opportunity), another option is to install a wireless/wired fan controller, so you don't even need to use the pull chains (except for reverse, if you use that, and that is generally only used a couple times a year).
There are retrofit options (like this wall-mount one or this handheld one) where you hardwire the controller into the fan itself (usually mounts inside the top of the fan, or in the junction box), and then you can install the remote anywhere and control the fan. The nice thing is this lets you control the fan speed and lights (if you have them) separately, even if it wasn't wired that way initially.
If it's just a fan, you can also just install a cheaper fan speed control switch, which replaces the existing switch.
When working on any electrical fitting you should always isolate it from the mains supply.
As to your specific question without seeing the connector I can't say how easy it will be to reattach, but as long as nothing's actually broken you might be able to reassemble it.