Gao (1996) gave the expression to calculate NDWI using Near Infrared (NIR) and Short wave Infrared (SIR), while some research suggests the use of the Green (G) band and Near Infrared (NIR) bands. How to determine which bands to be used?
Both expressions are correct. The choice to select the Bands depend on your application.
Near Infrared (NIR) and Short wave Infrared (SIR) are used to monitor changes in water content of leaves (Gao 1996)
Gao, B. C. (1996). NDWI—A normalized difference water index for remote sensing of vegetation liquid water from space. Remote sensing of environment, 58(3), 257-266.
Green (G) band and Near Infrared (NIR) band is used to monitor changes related to water content in water bodies (McFeeters 1996)
McFeeters, S. K. (1996). The use of the Normalized Difference Water Index (NDWI) in the delineation of open water features. International journal of remote sensing, 17(7), 1425-1432.