When I am at the end of the end of the quest "A night to remember" in the grove that Sam is in, he won't talk to me he just attacks me and I don't know how to fix it.
This is listed as a known bug with this particular quest on the UESP wiki. The suggested solution is to reload an old save, unfortunately. You can try yielding (sheathing your weapon if you have one out, or unsheathing and then resheathing if you don't). If you're on a console (Xbox 360 or PS3), these are likely your only options.
If you're on the PC, you could try using the developer's console. I highly recommend that you backup your save before you start messing around in there, as you may create game-breaking situations.
Once you've made your backup, open the developer's console, click Sam, and then use the command:
To attempt to reset the aggression variable on this NPC.
Alternatively, you could try:
Which will cause the NPC which ends this quest to be moved to your location. It's possible that if you're in the right spot this will end the quest and get you back into the real world.
If you've given up hope of wrapping up this quest, you can abandon the grove and head back to Skyrim with:
which will jump you back to Whiterun.