Why is density of water maximum at 4 degree celsius?
The answer appears to be fairly complicated, but fundamentally it results from a competition between two different options for water molecules interacting. 

One place to start would be The structure of water; from ambient to deeply supercooled, Lars G.M. Pettersson and Anders Nilsson, J. Non-Crystalline Solids 407 399-417 (2015) where they discuss the 'inhomogeneous structure hypothesis'. At its heart they define high density liquid (HDL) and low density liquid (LDL) (not connected to cholesterol!) structures. LDL is tetrahedral, HDL is more distorted. LDL is directional H-bonded, while HDL is more van der Waals influenced. LDL minimized enthaly, HDL maximizes entropy. These are all consistent with a variety of experimental and simulation work given in the paper. 

A recent paper applying DFT to the problem, Interstitial Voids and Resultant Density of Liquid Water: A First-Principles Molecular Dynamics Study, Sohag Biswas et al., ACS Omega 3 2010-2017 (2018), suggests a similar general picture. Again, the tradeoff of hydrogen vs van der Waals bonding appears to be important. Different exchange/correlation terms provide somewhat different answers. One suggested reason for the HDL structure is that, by incorporating an 'interstitial' water molecule into the LDL, one disrupts the directional hydrogen bonds and enhances the breaking and making of them, blurring out the structure (while being higher density).

So, it isn't a simple one-phase picture, but still seems to be a tradeoff of entropy and enthalpy of different configurations in the water.