How does the dihedral angle work? I've been looking for this topic on the internet but I don't have enough concrete answers. Suppose we have a plane with dihedral and it has a suddenly swinging to the right (watching from the nose of the plane), so the right wing goes down. I'm trying to understand why the right wing generates more lift than the left wing when it has a sideslip. I have seen in some sites that the sideslip induces a flow from the tip to the root and this makes the right wing increase locally the angle of attack, hence the lift of this wing increases too. 

But, why the right wing increases the angle of attack? I think it couldn't be possible because the sideslip flow is in a different plane respect the mainstream.
Basically, dihedral effect is that during banking, the 'lower' wing will experience a higher angle of attack compared to the 'higher' wing, and a result, a greater lift. The resulting net force and moment reduces the banking angle, reducing stability.
Consider a wing with a dihedral angle $\Gamma$ with a forward airspeed of $u$. If the sideslip angle is $\beta$, the wind due to sideslip is $u \cdot \sin\beta$. From geometry, the normal velocity induced due to dihedral, $v_{n}$ becomes $u \cdot \sin\beta \cdot \sin\Gamma$.

Image from Stability and Control of Aerospace Vehicles
Note: The notations are different in the figure; but the principle is the same.
For our purposes, we can take the sideslip velocity ($u \cdot \sin\beta$) as $v_{y}$. Now, consider two sections from the wing - one each from the 'lower' and 'higher' sides. The induced velocity is of the same magnitude in both the sides, while the direction differs, as can be seen from the above figure.

Image from people.rit.edu

Image from Stability and Control of Aerospace Vehicles
For small angles, $v_{y}$ is nearly equal to $u \beta$. The induced angle can be given as,
$\Delta \alpha = \frac{v_{n}}{u}$.
From the earlier relations, we have,
$\Delta \alpha_{1} = \beta \cdot \sin\Gamma$, and $\Delta \alpha_{2} = -\beta \cdot \sin\Gamma$.
Because of these induced angles, the lift on the downgoing wing increases by $\Delta L$, while of the other one decreases by $\Delta L$. The net result is that the 'lower' wing experiences an increases lift, causing a rolling moment, which causes the banking angle to reduce.

Image from Stability and Control of Aerospace Vehicles