From contextuality of a single photon to realism of an electromagnetic wave