The question often comes up of whether it's worth making repairs and upgrades to a home, or just selling it the way it is. I think the first thing to consider is the value of the land without a house there at all. If the land itself is very unique and valuable because it's right on the beach, or has a spectacular view or a very desirable address, then repairing a roof may not be so important. Particularly if the house itself is small and dated, and the land value supports building a larger new home worth significantly more. If you have a huge lot in Beverly hills with a little old house on it that has significant deferred maintenance, don't bother with the repairs because someone will likely tear it down and build something much fancier there.
If it's not a property with uniquely high value, and the house isn't so far gone that it's not worth saving, then yes, it often is worth doing some work to it, because you will have many more buyers for a house that's move in ready. Buyers are often willing to pay a premium if they can just move in and not have to deal with further expenses or projects. It's important to work with a good realtor to estimate the sales price with and without the work, and help you get bids on the costs of making repairs. If the estimated sale price that the house would fetch is far in excess of the current value plus the cost of the repairs, then it's worth doing the work.
Of course you must consider whether you can afford to pay for repairs from savings. If not, there are several pre-sale concierge services which will hire the workers and get the projects done and take payment from the proceeds of the sale. I believe this is often a better solution than financing the repairs from a home equity loan, but a homeowner will have to compare the options for their project and market and see which makes more sense.
Technically, all property is sold as is, and a seller is required to disclose any known defects. Obviously buyers do not enjoy discovering expensive surprises when they do inspections, so a seller who knows of a problem can also choose to offer the buyer a credit for that repair upfront. For example, a client of mine bought a property where the seller knew his foundation needed a serious repair. He had gotten a bid for $40,000 for the repair and wrote into the contract that he was going to leave $40,000 from the proceeds of the sale in an escrow account to be paid to the foundation repair company at close, thereby taking the problem out of the negotiation completely.
Once you've decided it's worth making repairs and have identified a source of funding those repairs, you'll have to decide which repairs are worth doing, and weigh the cost versus potential benefit of each. A leaking roof is bad news when you're selling in the middle of winter and buyers see puddles, so that's a problem worth fixing. Something like a coat of fresh paint won't cost a ton and will likely make the house appear updated and appealing to buyers, whereas something like a foundation repair could be expensive and won't be visually impactful but will save you difficulty during inspections and negotiations for repairs. Should you change your bathroom tiles to something trendy and expensive? Should you replace your appliances? Among the many reasons why you need a great agent, is that your Realtor will help you go through each item and decide whether, how and to what extent it's worth doing. And it will be nice to not have a leaky roof while you're selling!