Like camping in grizzly country, being aware of your surroundings is the key here. Keep your eyes open to what is going on around you: Is your boss the only one staying? Are there others? Is there a crisis or a big project going on? If so, then you should stay and show you are willing to pitch in. But if it’s just your boss hanging around after hours, and it’s to organize his or her desk, then feel free to kick-start your weekend.
It’s a balancing act. You want to help out if it’s called for, but you also want to take advantage of the benefit of summer hours. Summer goes by quickly, and you’ll be scraping your windshield again before too long. Staying just to stay is a waste of time; you won’t look good sitting around doing nothing. So unless there is a reason to stay, go!