There is not a set time, it is whenever they reach capacity. It can happen early in the morning, reopen later in the afternoon, only to close again in the evening. It just depends on the crowds. You will find that on days like NYE MK will be closed to capacity VERY early (I have seen as early as 9:30am)... As far as reaosrt guests, you are Guaranteed entrance to "A" park, it may not be the park of your choice, if capacity is met it is closed to everyone... Here is a listing of the different phases of a park closing, you will see resort guests are the last to be turned away, but when it reaches that phase they too will be sent to another park.
Phase One:
Guests meeting these criteria are told the Park has reached capacity.
Day Guests with MYW Base tickets or one-day one-park tickets, Guests without Theme Park admission and Cast Members will be turned around at the Auto Plaza.
Phase Two:
Only guests meeting the following criteria are admitted: Resort Guests, Annual and Premium Passholders, Guests with Park Hopper tickets, and Guests re-entering this Park today. Guests using WDW Resort Transportation and Guests in taxis will be admitted.
Phase Three:
Only guests meeting the following criteria are admitted: The theme park is only open to Resort Guests and Annual and Premium Passholders. Shades of Green and Downtown Disney Resort Area Guests using their respective transportation will also be admitted.
Phase Four:
Closed to all Guests, the Park has reached capacity.