Exposed wire in ceiling light
There's definitely a water-ingress problem here (or was).  That green corrosion on the copper wires is very severe.  So your much bigger problem is structural damage to the building (or black mold) due to what else the water has been up to.  

However in the meantime, those loose wires are dangerous, and the remaining visible bare wire is probably shot.  Even if the sockets were replaceable, it doesn't look like there's enough wire length left to splice to them.  So the fixture is shot. 

When you buy a new fixture -  we're not talking a lot of money here - either buy a pure-LED fixture that does not have replaceable bulbs (this will be more money), or buy one that is open on the sides and allows airflow to the bulbs.  That way you can upgrade to LED and save a ton off your electric bill. 

If swapping a fixture is too much for you, any competent handyman can handle the task.  To give you a sense of the difficulty, most towns that require permits don't require a permit for "swapping a light fixture", as it is considered to be a trivial repair by electrical standards.