Consider the following:
It is Aaron's precombat main phase. He has two Nest Robbers in his hand (2/1 haste for 2). His opponent, Nick, has two untapped lands, a Plains and a Mystic Gate.
Aaron casts a Nest Robber. Nick uses his Plains and his Mystic Gate to make two blue mana, and casts a Spell Snare, leaving a blue mana in his mana pool.
Aaron fears another counterspell, and proceeds through his turn. Nick uses the blue mana in his pool to cast an Opt before the mana drains from his pool.
After the Opt resolves, can Aaron cast the second Nest Robber and swing with it? That is, is it his main phase or his beginning of combat phase?
Consider the following:
Aaron can cast the second Nest Robber and swing with it.
Mana drains from the mana pool at at the end of each step or phase as per CR (emphasis mine):
106.4: When an effect produces mana, that mana goes into a player’s mana pool. From there, it can be used to pay costs immediately, or it can stay in the player’s mana pool. Each player’s mana pool empties at the end of each step and phase.
116.3b: The active player receives priority after a spell or ability (other than a mana ability) resolves.
Once Aaron receives priority he will be able to cast the Nest Robber as the stack is empty and it is still his precombat main phase (as per CR, emphasis mine):
116.1a: A player may cast an instant spell any time he or she has priority. A player may cast a noninstant spell during his or her main phase any time he or she has priority and the stack is empty.
With no other information, it will be Aaron's Main Phase once Opt has resolved, which will allow him to cast a creature in this case Nest Robber.
To advance Steps and Phases all players must Pass Priority on an Empty Stack.
The game actions that occur before the crux of the question:
- Spell Snare resolves
- Aaron has Priority, due to being Active Player and the Stack being Empty
- Aaron passes Priority to offer to move to the next Step or Phase
- Nick gains Priority with an Empty Stack
In this case Nick can make one of two choices (in this scenario)
Choice 1: Pass Priority
If this happens his mana will empty his pool [106.4] and the game will move to Aaron having priority at the Beginning of Combat Step in the Combat Phase (this can actually be somewhat complex to this ruling, which is out of scope here but interesting)
Choice 2: Cast a Spell
In this case Nick can cast Opt, as his mana pool has one blue mana in it.
When Opt resolves, Aaron will gain Priority in his Pre-Combat Main Phase as he is the Active Player and the Stack has not had all players pass Priority on an Empty Stack
Aaron can now take any game actions allowed in the Pre-Combat Main Phase, in this case cast the Nest Robber and once again Pass Priority on an Empty Stack.
By proceeds with his turn I assume you mean Aaron is declaring moving to combat. This is a shortcut which really just means the active player passing priority in the precombat main phase. If all players also pass priority, play moves to the beginning of combat step in the combat phase. (Note the accepted combat shortcut used to pass priority not only in the precombat main phase, but also pass priority in the beginning of combat step, this has been changed, the active player gets priority first again in beginning of combat.)
Here Nick decided not to pass priority, but to take the opportunity to use his priority and cast a spell, Opt. This passes priority back to Aaron still in the main phase to respond to that spell. Aaron can't or chooses not to so Opt resolves. When the spell resolves, Aaron gets priority back, still in his main phase and since the stack is now empty he is able to cast sorcery speed spells, like Nest Robber.
This is different than the usual way precombat instants tend to be played, because Nick had to use the mana or lose it. Normally when the non active player wants to cast a spell before combat (usually something like Cryptic Command to prevent attacks) they wait until they get priority in the beginning of combat step in the combat phase.