the market makers go out drinking with their buddies every night. they get drunk and throw darts at a page with numbers on it- wherever the darts land is how they determine opening price- what- you mean that you actually thought their is logic behind it?

a. nasdaq, market makers start lining up with bid/ask shortly before premarket opens at 8AM ... when the market opens they go ... it's trading already by the time 9:30 runs around so whatever happens happens and the price at 9:30 is posted to world as the "open" ... but it's hardly that

b. NYSE, all the lining up happens in the specialists head also premarket orders are going off on instinet, ecns ... specialist opens it where he thinks supply/demand etc and he can make money

c. stock index futures. don't really close just keep trading through the night on Globex ... close on weekends for a bit, then players line up etc

d. pit trading, they all scream at each other and the first person to make a trade sets the open