When we refer to Yoga in this context, we are referring to Yogasanas or Yoga postures, Surya Namaskar or Sun Salutation and Pranayama or Breath control.
Sweating is a result of the outside temperature and the intensity of physical activity. As a general rule, sweating is not required to get the benefits of Yoga. In fact, if one experiences sweating as a result of high intensity of physical activity, which would also result in increase in the heart and breath rate, it is recommended that one relaxes in Savasana till the breathing becomes normal.
Surya Namaskar is a physically demanding activity and could result in sweating. The Asanas and Pranayama would generally not result in sweating as the intensity of physical activity is not high.
Whether sweating is good or not, also depends on the constitution of the individual. If a person is of Kapha type (heavy, big), high intensity activity or Vyayama is recommended in addition to vigorous Yoga. Sweating is fine here. But if someone is of Vata type (thin, weak), low intensity activity is recommended, such as the Asanas and Pranayama.
It is best to consult an Ayurvedic Lifestyle Coach about what is suitable for your body type. Write to firstname.lastname@example.org for more information.