Why is the event registration "Thank You" page generating an error?
This seems to be similar to: CiviEvent - Error when registering: Could not find valid value for id

If you are using WordPress, then setting the base url might help. Copying my response to that issue below:

I was having a similar problem. I noticed the base url for WordPress was not set. 

If you haven't set that, try setting that in Administer > CMS Database Integration and let us know if that fixed your issue.

Make sure the event is not the home page, that seems to cause problems with the base url.