Here's what Vegas has on hand to determine this stuff:
Tons and tons of stats, and smart folks to interpret them.
They have historical game stats, but more importantly, they have stats on historical betting tendencies.
The other half of this is that oddsmakers don't make their money predicting outcomes with their point spreads, but betting tendencies.
Do you ever wonder why college lines are sometimes super ridiculous? Like 28 points ridiculous or more? It's because the odds makers know that if they make it any closer than that, everyone will bet the favorite and they'll lose a lot of money. So instead they set a line that's in play, but it moves the goal posts on the betting so that the favorite isn't the clear bet.
Then the magic starts. For football especially, Vegas will set an initial line at the beginning of the week. And then, as the bets roll in, they'll judge the balance of the betting and shift the line to entice people to put money down on the weaker side.
This means that largely, the final line is dictated by the initial stats Vegas uses to set the line, but then it's dictated by the wisdom of the crowds.