Here's a somewhat similar question with a relevant answer.
How does the lighting effect the dice roll?
How does vision type impact the roll when its not full day light?
That depends on how dark it is, and what kind of vision they have. Here's the rules for vision and lighting:
In an area of dim light, a character can see somewhat. Creatures
within this area have concealment (20% miss chance in combat) from
those without darkvision or the ability to see in darkness. A creature
within an area of dim light can make a Stealth check to conceal
itself. Areas of dim light include outside at night with a moon in the
sky, bright starlight, and the area between 20 and 40 feet from a
torch.
In areas of darkness, creatures without darkvision are effectively
blinded. In addition to the obvious effects, a blinded creature has a
50% miss chance in combat (all opponents have total concealment),
loses any Dexterity bonus to AC, takes a –2 penalty to AC, and takes a
–4 penalty on Perception checks that rely on sight and most Strength-
and Dexterity-based skill checks. Areas of darkness include an unlit
dungeon chamber, most caverns, and outside on a cloudy, moonless
night.
There would be a -4 penalty if you're in darkness, unless they have darkvision. There isn't a penalty in dim light. True darkness is less common than you'd expect at the ranges you're talking about, as someone in the party likely has a light source (unless they all have darkvision).
Low-light vision increases their light range so that they can use a light source that's farther away for dim light. There's a chart in the linked rule that has more details.
Note that if you're attacking someone in dim light or darkness and you don't have darkvision, you can't Sneak Attack because the target has concealment as well. From the Sneak Attack class feature:
The rogue must be able to see the target well enough to pick out a
vital spot and must be able to reach such a spot. A rogue cannot sneak
attack while striking a creature with concealment.
Do his friends get to roll to see me and warn him somehow during my approach?
They could get to roll Perception to see you if they're in a position to do so. They do not get to warn him or take any action as this is all happening on your turn, unless they somehow have a way to act on your turn (such as a Ready Action). Technically speaking they can speak on your turn, but I can't remember any DM who ever allowed that as a defense against stealth attacks. The target can't react as it's not their turn, and they still can't tell where you're coming from as they failed to notice you. Knowing there's someone somewhere in the area who might attack doesn't negate the surprise of an attack when it actually comes. (If I did, "I always expect an attack" would basically negate invisibility's surprise.)
Note that after you attack you lose Stealth anyway, so a roll from the other characters except the one you're attacking is likely a waste of time.
If its full day light can I still do this?
This appears to be highly contentions in the Pathfinder world, but as far as I can tell, no. Here's the Stealth rule:
Breaking Stealth: When you start your turn using Stealth, you can
leave cover or concealment and remain unobserved as long as you
succeed at a Stealth check and end your turn in cover or concealment.
Your Stealth immediately ends after you make and attack roll, whether
or not the attack is successful (except when sniping as noted below).
Now, here's the problem (again from the vision and lighting rules):
In an area of bright light, all characters can see clearly. Some
creatures, such as those with light sensitivity and light blindness,
take penalties while in areas of bright light. A creature can't use
Stealth in an area of bright light unless it is invisible or has
cover. Areas of bright light include outside in direct sunshine and
inside the area of a daylight spell.
Bright light means you're not in cover or concealment (without getting it from another source). While the rule says if you started in stealth you can move and you lose it when you attack, the rules also say that you can't use the Stealth skill at all in bright light without cover. If you step into the open to attack you don't have cover, which means you can't use Stealth at all. Since the target is allowed a perception check when it's most favorable to them (see the designer note), they get to make it once you're in the open and automatically succeed.
In that case you'd need some other means to grant the conditions to use Stealth. Some options are spells such as Invisibility, Deeper Darkness, or Fog Cloud, along with feats like Hellcat Stealth.
That's the opposite of what I said before, but given the way that Perception works I think it's more correct. Once you step into bright light your Stealth doesn't work as per the light rules. That means they see you. The attacking from Stealth rules work if you're attacking at range from behind cover, or you have conditions that let you use Stealth.
RAW the Rogue does receive the benefits of Expertise to his passive.
A passive check is a special kind of ability check that
doesn’t involve any die rolls. Such a check can represent
the average result for a task done repeatedly, such as
searching for secret doors over and over again, or can
be used when the DM wants to secretly determine
whether the characters succeed at something without
rolling dice, such as noticing a hidden monster.
Here’s how to determine a character’s total for a
passive check: 10 + all modifiers that normally apply to the check. - Player's Handbook P.174
The player has invested in making this character good at this, this is not a bad thing.
Rogues in general are supposed to be good at this type of thing, hence the proficiency bonus class feature and the player specifically spent a feat on making his passive perception better. The player could've spent this on another feat to specialize in another area (or gain a combat ability). This is a good thing, while it may make it difficult for the Rogue to be surprised by a trap or an ambush you should in no way try to outmaneuver this.
Don't worry, there are downsides to the Rogue for this.
To reliably spot traps and ambushes the rogue will need to be at the head of the marching order so that he has clear sight lines. Rogue's are not particularly hardy and the party as a whole is inviting more risk for this reward. Likewise while he is extremely excellent at spotting physical dangers, the Rogue will not be able to detect magic wards and other dangerous enchantments and may equally blunder into them.
Ways to handle his detection of a trap or an ambush
You are correct in assuming that only that PC has seen the trap/enemy. Unless he has some mode of telepathic communication he will need to speak out and announce the threat to everyone. The best way to handle this sort of thing is to pass notes or send text messages to the player(s) able to see/detect the issue and leave it to them to react and tell someone else. Intelligent enemies will see/hear the rogue warning the party and the combat should start immediately (no surprise round though).
The PC does not become omniscient of the trap upon detecting it.
The PHB itself is very, very vague on what information is received when a PC detects a trap. However, the DMG does have a nice little section about traps, their detection, and disarming them:
If the adventurers detect a trap before
triggering it, they might be able to disarm it, either
permanently or long enough to move past it. You might
call for an Intelligence (Investigation) check for a
character to deduce what needs to be done, followed
by a Dexterity check using thieves' tools to perform the
necessary sabotage...
...In most cases, a trap's description is clear enough
that you can adjudicate whether a character's actions
locate or foil the trap. As with many situations, you
shouldn't allow die rolling to override clever play and
good planning...
...Foiling traps can be a little more complicated.
Consider a trapped treasure chest. If the chest is opened
without first pulling on the two handles set in its sides, a
mechanism inside fires a hail of poison needles toward
anyone in front of it. After inspecting the chest and
making a few checks, the characters are still unsure
if it's trapped. Rather than simply open the chest, they
prop a shield in front of it and push the chest open at
a distance with an iron rod. In this case, the trap still
triggers, but the hail of needles fires harmlessly into
the shield. - Dungeon Master's Guide p. 121
Essentially though whether trap disarming is simply a dex check, a series of checks, and/or involves serious RP is up to you as a DM. I would encourage the open-ended approach the book suggests as it adds complexity and makes trap checking and disarming a more engaging process. Sitdown with the party OOC and discuss what the table as a whole thinks should happen for trap checks and move forward based on that consensus.
Best Answer
There is no such time interval
If a hero successfully hides, DM is not obliged to repeat the check just because some time passes.
If there was such an interval, noticing the hidden hero was the matter of time. However, winning a Stealth/Perception contest assumes the hero can succeed (hence, stay unnoticed).
From the Core Rulebook:
So, winning the contest doesn't mean you hide "for the next N seconds", it means the whole situation was successful. However, the situation itself might change.
For example, when your hero leaves cover, you need to make another roll if you want to remain hidden:
That doesn't imply you need to make such roll when you don't leave cover.
DM should ask for another roll when circumstances change
If the hero tries to do something else except hiding, or the "bad guy" get a clue, or circumstances change (e.g. morning comes), the DM can ask for another check, if they thinks it is necessary - but the more checks they asks, the more risky situation becomes for the hero. How risky it should be, is completely up to the DM.
DC itself can depend on how long the hero intents to hide for. Hiding all day is harder than hiding for a few seconds. In both situations it will be a one single roll though.