We calculate the time evolution of the expectation value of the energy-momentum tensor for a minimally coupled massless scalar field in cosmological spacetimes, with an application to dark energy in mind. We first study the evolution from inflation until the present, fixing the Bunch-Davies initial condition. The energy density of a quantum field evolves as $\ensuremath{\rho}\ensuremath{\sim}3({H}_{I}H{)}^{2}/32{\ensuremath{\pi}}^{2}$ in the matter-dominated (MD) period, where ${H}_{I}$ and $H$ are the Hubble parameters during inflation and at each moment. Its equation of state, $w=\ensuremath{\rho}/p$, changes from a negative value to $w=1/3$ in the radiation-dominated (RD) period, and from $1/3$ to $w=0$ in the MD period. We then consider possible effects of a Planckian universe, which may have existed before inflation, by assuming there was another inflation with the Hubble parameter ${H}_{P}(>{H}_{I})$. In this case, modes with wavelengths longer than the current horizon radius are mainly amplified, and the energy density of a quantum field grows with time as $\ensuremath{\rho}\ensuremath{\sim}(a/{a}_{0})({H}_{P}H{)}^{2}/32$ in the MD period, where $a$ and ${a}_{0}$ are the scale factors at each time and at present. Hence, if ${H}_{P}$ is of the order of the Planck scale ${M}_{P}$, $\ensuremath{\rho}$ becomes comparable to the critical density $3({M}_{P}H{)}^{2}$ at the present time. The contribution to $\ensuremath{\rho}$ from the long wavelength fluctuations generated before the ordinary inflation has $w=\ensuremath{-}1/3$ in the free field approximation. We mention a possibility that interactions further amplify the energy density and change the equation of state.