Cosmology ultimately aims to explain the initial conditions at the beginning of time and the entire subsequent evolution of the universe. The “beginning of time” can be understood in the Wheeler-DeWitt approach to quantum gravity, where homogeneous universes are described by a Schroedinger equation with a potential barrier. Quantum tunneling through the barrier is interpreted as a spontaneous creation of a small (Planck-size) closed universe, which then enters the regime of cosmological inflation and reaches an extremely large size. After sufficient growth, the universe can be adequately described as a classical spacetime with quantum matter. The initial quantum state of matter in the created universe can be determined by solving the Schroedinger equation with appropriate boundary conditions. I show that the most likely initial state is close to the vacuum state. This is the initial condition for inflation favored both by observational data and theoretical considerations.