Hybrid beamforming, which consists of an RF precoder and a baseband precoder, has been proposed to reduce the number of RF chains at the massive multiple input multiple output (MIMO) base station (BS). This paper studies the impact of channel state information (CSI) on the capacity of massive MIMO systems with codebook-based hybrid beamforming , where the RF precoder is selected from a finite size codebook. Two types of CSI at the BS (CSIT) are commonly assumed: full instantaneous CSIT and hybrid CSIT (channel statistics plus the low-dimensional effective channel matrix). With full instantaneous CSIT, both the RF and baseband precoders are adaptive to the full instantaneous CSI at the fast timescale. With hybrid CSIT, the RF precoder is adaptive to channel statistics only, and the baseband precoder is adaptive to the instantaneous effective channel, yielding lower implementation complexity by sacrificing some capacity. We derive asymptotic sum capacity expressions under these two types of CSIT. We find that, in codebook-based hybrid beamforming systems, exploiting the full instantaneous CSIT can only achieve a marginal SNR gain and hybrid CSIT is sufficient to achieve the first-order gain provided by the massive MIMO for most of the cases. We also propose fast and slow timescale RF precoding algorithms, which asymptotically achieve the capacity under full instantaneous CSIT and hybrid CSIT, respectively.