Maxwell's equations or in your case the simplified version for the electrostatic field are only complete together with appropriate boundary conditions. The fundamental macroscopic equations read (in Heaviside-Lorentz units)
[tex]\vec{\nabla} \cdot \vec{D}=\rho, \quad \vec{\nabla} \times \vec{E}=0.[/tex]
In linear-response approximation the constitutive equation reads
[tex]\vec{D}=\epsilon \vec{E}.[/tex]
If you have a discontinuity like your problem with the two dielectrics joining at a given surface, you have to use the integral form of these laws for appropriate geometries of the volume elements, surfaces, and boundaries of these.
Let's start with the first equation. Here, since you have a divergence, you should apply a volume integral. To get the boundary conditions for the displacement [itex]\vec{D}[/itex], you integrate over an infinitesimally small cube with two of its boundary surfaces parallel to the boundary of the two media, one in the one medium and one in the other. Using Gauß's integral theorem, you then get
[tex]\vec{n} (\vec{D}_1-\vec{D}_2)=\sigma,[/tex]
where [itex]\sigma[/itex] is the corresponding surface charge along the boundary. You have to be careful with the signs: In the way given here, the surface normal vector [itex]\vec{n}[/itex] must point from medium 2 into medium 1 according to the rule that the surface-normal vectors in Gauß's integral theorem must point out of the volume you integrate over.
Because of the curl, in the second equation you have to choose an appropriate infintitesimal rectangular area with two of it's edges parallel to the boundary of the media and two perpendicular (of course you can choose any such surface). Using Stokes's integral theorem this leads to the conclusion that all components of [itex]\vec{E}[/itex] tangent to the boundary between the media must be continuous across this boundary.