Most golf courses are not flat. They have hills that must be traversed. Riding a golf cart, you usually do not notice the change in elevation. Walking those hills will really give you a great appreciation for the lay of the land. This should also give you ideas for how best to play your shot.
As with any exercise plan, you should check with your doctor. Your doctor can best determine if you are capable of walking for 18 holes on a golf course. Chances are the doctor will enthusiastically recommend it.
Go out there and enjoy walking the golf course. It could improve your golf game. It will certainly improve your health. If you are having a bad day on the golf course, taking your focus off of your game by enjoying the scenery while walking can be a great stress relief.