I've been battling this for weeks: iOS devices syncing calendars via iCloud perfectly, but the "500" error and no syncing on all my Macs. I came across a thread that mentioned something about shared calendars and invitations. So... I went to my wife's Mac, deleted the shared calendars (i.e. calendars I was sharing with her) and - like magic - iCal began to sync like it's supposed to.
I hope this helps others who've been struggling with this.