When to GoFirst thing: if you come from the northern hemisphere, remember that seasons are different. Summer is from mid-October to mid-February, autumn from February to April, winter May to July, and spring August to October.
South Africa has a very temperate climate for African standards; yes, summers are quite hot, but nothing like elsewhere in the continent. If you want to go to the beach, summer is an obvious choice, but on the eastern coast you can swim comfortably almost at any time of the year. Obviously, the peak season for beaches (with higher prices and more crowd) is mid summer, from mid December to late January. If you want to go diving and surfing, the best time is winter (April to September), but any time of year will be good for this kind of activities.