Chemistry - Why is water a dipole?
Solution 1:
Yep, it has to do with the orbitals.
$\ce{CO2}$ is linear, so even though the $\ce{C-O}$ bonds have individual dipole moments, the overall dipole moment is zero as these cancel out (they point in opposite directions, as shown in the diagram below).
On the other hand, $\ce{H2O}$ is "bent", which means that the individual dipole moments of the bond are at an angle to each other. They add up to give a net dipole moment (shown with grey in the diagram).
The colors indicate electron density, red is more dense/blue is less dense. Dipole moment is from low density to high density.
OK, so why do these molecules have differing shapes? This is where orbitals come in. I'll try to explain as much as I can without going into orbitals.
Carbon has an outer shell electronic configuration as $2s^22p^2$. Out of these four electrons, two are used in $\pi$ bonds, and two in $\sigma$ bonds. If you don't know what those are, just look at it like this for now: A set of bonds between two atoms will have one and only one $\sigma$ bond, with the rest of them $\pi$ bonds. So, any single bond is made up of just a $\sigma$ bond, a double bond is made up of one $\sigma$ and one $\pi$, and a triple bond is made up of one $\sigma$ and two $\pi$ bonds. What these types of bonds actually are can be explained if you know what an orbital is.
Now, what VSEPR says is that the geometry of the molecule is only decided by the $\sigma$ bonds and lone pairs on the central atom. You count up the $\sigma$ bonds and lone pairs (lets say they add up to $x$), and decide the geometry based on that. The geometry is the most stable configuration of $x$ hybrid orbitals. In simple terms, if we took $x$ balloons and tied them together, the directions the balloons point in help us correspond to where the bonds and lone pairs lie:
In $\ce{CO2}$, we have two $\sigma$ bonds and two $\pi$ bonds (as each double bond has one of each type). Each bond takes up one electron from carbon, so we have no leftover electrons for forming any lone pair. Since we have two $\sigma$ bonds and 0 lone pairs, $x=2$, giving us the structure given by the first set of balloons, which is linear. And $\ce{CO2}$ is indeed linear:
Now let's take water. The central atom (Oxygen) has a valence configuration of $2s^22p^4$, that is, 6 electrons. In water, since we have two single bonds, we have one $\sigma$ bond each (and no $\pi$ bonds). So we have total two $\sigma$ bonds.
But this leaves us with $6-2=4$ unpaired valence electrons. These form two "lone pairs" (pairs of electrons which do not bond). With two lone pairs and two $\sigma$ bonds, $x=4$. This gives us a tetrahedral structure (third in the balloon diagram). Two of the four points in the tetrahedron are occupied by the lone pairs, and two by bonds:
(Note that the angle 104.5 is not the same as the angle in perfect tetrahedra, 109.25--this is due to the lone pairs repelling each other)
So finally, we have the following "bent" structure for water:
From the structure, as shown above, it is very easy to check if the molecule has a dipole moment.
Solution 2:
Fundamentally, dipolar simply means that a region of the molecule has a center of positive charge and a center of negative charge. We can say that water has a dipole moment because it is not a 'balanced' molecule, like $CO_2$ is. I understand what you are really asking though.
I believe it likely has something to do with orbitals. You can look into VSEPR Theory for an explanation of why water has a bent shape. It might have to do with both reasons you mentioned, the electronegative properties, and also that oxygen just has more electrons in general (and therefore needs to put them somewhere that has a low amount of energy).
According to VSEPR, the electron's try to separate themselves out as far as possible, that is one explanation for why the molecule has a bent shape. The electrons orbiting oxygen will inevitably occupy what they call the p orbitals. These extend outward a greater distance, allowing the electrons to occupy a space that is further away from the other electrons, and therefore requires less energy to do so (because electrons repel each other).
This model seems slightly counter-intuitive though, and requires a bit of imagination and understanding of the theory itself, if not a great deal quantum physics. But, like any good model, it tends to predict molecular properties and shapes, and this is why it is taught in schools.