Golf classes can significantly help a player achieve their goals. If you're just starting out, your professional or swing coach can teach you the fundamentals of the game. If you know the basics but want to improve, they can focus on more advanced techniques, such as following your changes. Yes, but only if you are taught by a good golf instructor and only if you dedicate yourself to your practice.
A good teacher will guide you in the right direction and give you the right exercises to work on, but how much you improve depends on how committed you are to the practice. The golf lesson equivalent of “Are we there yet? is “How quickly can I improve? Some improvements come faster than others. But the skill level to be able to control those shots and predict the outcome consistently is another variable that needs to be learned. As a general rule, beginners should take 3 to 5 golf lessons before playing on a course to help them learn the basics of swing and the rules.
It's not mandatory to take classes and only 15% of golfers seek professional instruction, but they're generally considered one of the best ways to improve a player's game. Not only can the golf pro help you identify your strengths, but an important part of the game is understanding the strategy of the course. Having this 2-3 hour lesson can help you create a game plan and allow you to build on your strengths. The key is to follow the game plan in the future.
Golf classes are a great way to build the foundations of a solid golf swing under the guidance of a qualified professional, which is much better than doing it alone. But if by “good” you mean individual numbers or lower, then you're unlikely to reach that level without golf lessons and without the guidance of a professional golf instructor. I like your swing, however, how many golf lessons you need throughout your golf career and when you take them, is something personal to you. Hopefully, your golf professional can help you better understand golf swing and ball flight laws.
The only people qualified to learn golf for themselves are PGA professionals who have undergone the proper training to understand how the golf swing works and how to correct swing failures when they arise. Lessons are essential for beginners who are trying to learn the basics and can lay a solid foundation for a good golf swing.