Samsung and LG one-up themselves with camera aperture. The S6 came out with f/1.9, the G4 countered with f/1.8. The Galaxy S7 edge snatches back the title with f/1.7 (the brightest we've seen on a phone) while the LG G5 sticks with f/1.8.
Samsung also specifically picked a sensor with fewer but larger pixels. This, combined with the aperture, gives the S7 95% more light to work with than its predecessor, the S6.
The Samsung Galaxy S7 edge definitely captures more detail in the dark, producing sharper images. It still underexposes the darkest parts of the image, but the LG G5 has to use stronger noise reduction to keep the noise in check. The darker it is, the more pronounced S7 edge's advantage is.