When you're buying your first handgun, chances are that you're doing so in the daytime. When you're learning how your first pistol operates, you're probably doing that on a well-lit range. When you're in a defensive situation, on the other hand, you won't have any control over whether it's light or dark ... and it's much more likely to be dark.
As instructor Ken Scott explains in this video from Smith & Wesson's GUNSMARTS series for new gun owners, one key tool to manage low-light shooting is the night sight. Although most "factory" firearms come with what is often called "white sights," you can purchase a gun with night sights already installed (like the S&W M&P Scott displays). Alternately, you can buy aftermarket night sights and install them—or have them installed by a gunsmith if you aren't comfortable doing that.
Whichever route you choose, investing in night sights for your handgun is a great way to ensure that you can always acquire a good sight picture, no matter the time of day.