Most launches that I've seen have occurred during the day. But I've also seen a couple of missions that have been launched at night. Are there any specific advantages or disadvantages to a day launch versus a night launch? Or is it completely irrelevant?
For a launch into orbit, it is mostly irrelevant, as Undo's answer correctly states. One aspect that has not been mentioned that might favour a night-time launch is to clear airspace. Perhaps some spaceports are located in areas that have some flight movements during the day, but none during the night; that would favour a night-time launch.
For sub-orbital launches, it all depends on the payload. For example, the sounding rocket Maxus reaches up to 700 km; higher than many LEO satellites, but it return to Earth immediately after. Many payloads are mostly concerned by the ~14 minutes of microgravity it provides, but for payloads that do atmospheric measurements of any kind, time of day can be relevant.
For example, sounding rockets are the only possible platform for in-situ measurements in the mesosphere (50–100 km up), which is too high for balloons, and too low for satellites. Research into noctilucent clouds might want to have coincident surface-based observations, which requires a night-time launch. Other atmospheric phenomena might also experience a marked diurnal cycle. So, in this case, it certainly matters.
Assuming you are talking about a 'classic' launch, one with rockets pushing something into orbit, no - it's completely irrelevant.
Darkness? Bah. Space programs have enough lights to send darkness cowering away in a corner, just like football games.
Ultimately, it's all about ballistics (the physics of getting from point A to point B). If the space station you need to dock with is at the right place at night, so be it. No problem.
There are some weather concerns, though - such as icing (the cold kind) on some spacecraft, high winds, thunderstorms, 6-inch hail, etc. These can occur during the day, though, so the time of day that a launch occurs is completely irrelevant.
Many launches have a designated launch time window necessitating a narrow period in which the launch must be made. The launch might fall only during the night or day period depending on these constraints. A limited launch window is a result of one or more mission objectives occurring later in orbit that can be met by the vehicle only being at a specific location in orbit at a specific time.
Examples might include:
- the need for the launch vehicle to make a planned rendezvous with an existing orbiting object.
- a requirement to be at a specific time and location later in orbit to deploy a mission payload.
- a requirement to later be positioned over a specific earth location at a specific time to fulfill a mission objective such as surveillance or provide communications or provide some other service.
Despite two answers that say "irrelevant" there can be some other second-order effects beyond the ones nicely described in @JayDawn's answer:
If you are launching into a dawn-dusk Sun-synchronous orbit you would obviously be launching around dawn or dusk, and not mid-day or mid-night.
If there are operations that are important to be recorded visually with cameras, like some complex deployment, you might time a launch so that this happens in daylight in space, but that could result in a daytime or nighttime launch, depending on the orbit.
As pointed out by @JohnHoltz, first launches of new launch vehicles might warrant careful visual inspection during the launch an ascent, so a daytime launch would be very desirable.