A repair may just reveal more issues after it's working. If you plan to stay in the home for a while and the opener is over 5 years old, it may be a great time to replace it. The quality of the existing opener should also be taken into consideration.
Manufacturers say the average life expectancy of an opener is 15-20 years. Since new openers are inexpensive, if the unit is over ten years old then it might not be worth repairing and it may just be time for an upgrade. If it's newer, then it's more likely a repair will be worth it.
A repair may just reveal more issues after it's working. If you plan to stay in the home for a while and the opener is over 5 years old, it may be a great time to replace it. The quality of the existing opener should also be taken into consideration.