The correct purpose of the commas in the sentence "Danielle goes to dance class on Tuesday, Thursday, and Saturday" is:
The commas separate the items in a series or list.
In this case, the items in the series are the days of the week when Danielle attends dance class.