How can we write the wave function in quantum mechanics?
The wavefunction contains all the information about the system of interest.  This is a basic premise of quantum mechanics.  

Within the Born-Oppenheimer approximation, we 'index' all the values required to describe where an electron is.  This includes the spatial coordinates, ($\textbf{r}$), and the spin coordinate, $\omega$.  Electrons are characterized by their spin ($\uparrow$ vs. $\downarrow$).  Another way to think about it is this.  The quantum numbers are used to describe everything we need to know about 'where' an electron is ($n$, $l$, $m_l$, $m_s$).  The spatial coordinates (e.g. Cartesian coordinates) take care of the first 3 quantum numbers.  We need the fourth coordinate to characterize $m_s$.