Earth's gravitational force is acting on its Moon in such a way that it forces the Moon to rotate round its orbit by centripetal force and carries it while rotating round the Sun by gravitational force. I don't understand why in this condition Moon doesn't come to the Earth while Earth is carrying it through gravitational force to rotate round the Sun?
Newtonian Gravity – How Does Earth Carry Moon with It If Gravitational Force Cannot Make It Touch?
celestial-mechanicsearthmoonnewtonian-gravityorbital-motion
Related Solutions
Let me try this way: the Sun isn't only pulling on the Earth, it's pulling on the Moon as well. The pull on the Earth is almost the same as the pull on the Moon, so the net effect of the Sun on the relative motion between the Earth and Moon is very small.
Recall Galileo's law of motion: if you drop two objects close together from the same height, they experience the same gravitational acceleration, so they stay together during their fall:
Now think of the ground as the Sun, the large object as the Earth, the small object as the Moon, and the fall as their orbit around the Sun: the Earth and the Moon stay together, because they experience (almost) the same gravitational acceleration from the Sun.
Notice that I said almost: the gravitational pull of the Sun decreases with distance, so the object closest to the Sun does feel a slightly larger acceleration. This means that if there wasn't any gravitational force between the Earth and the Moon, they would indeed slowly drift away from each other over time. But the gravitational force between them prevents this, and because this force is much bigger than the net effect of the Sun, the latter only causes small perturbations in the motion of the Earth and Moon around each other.
How does the Moon cause the tides?
By gravitation.
I'll start with an overly simplistic view of the tides. Suppose that the Moon was in a geosynchronous orbit and that the Earth was completely covered by water. In that case, the Earth's oceans would adjust themselves to form an equilibrium tide, first proposed by Newton, in which the surface of the oceans form an equipotential surface. The equilibrium tide is depicted below.
Image source: http://oceanservice.noaa.gov/facts/tidefrequency.html
I chose this image because unlike most, it does not invoke centrifugal force to explain the bulge opposite the Moon. The near side bulge, if it existed, results from the gravitational acceleration toward the Moon on the point on the Earth closest to the Moon being slightly stronger than the action on the Earth as a whole, while the far side bulge results from the gravitational acceleration there being slightly less than the action on the Earth as a whole.
A number of things prevent that equilibrium tide from existing: The Moon is not in a geosynchronous orbit, the Earth is not completely covered by water, a month is much longer than is a day, and others. The equilibrium tide, aka the tidal bulges, does not exist. This means the Earth's oceans are perpetually in a state of disequilibrium with respect to the forces that generate the tides.
To arrive a better view of those forces, I'll look at things from the perspective of a reference frame with its origin at the center of the Earth. From the perspective of this frame, the gravitational acceleration at a point on the Earth's surface toward the Moon is the vector difference between the gravitational acceleration at that point toward the Moon and the gravitational acceleration of the Earth as a whole toward the Moon. This is depicted in the left half of the below image.
Image source: GH Darwin, "The tides and kindred phenomena in the solar system, 3rd ed.", Houghton, Mifflin (1911), via HU Sverdrup, MW Johnson, and RH Fleming, "The Oceans: Their Physics, Chemistry, and General Biology, Vol. 7." Prentice-Hall (1942) at http://publishing.cdlib.org/ucpressebooks/view?docId=kt167nb66r;brand=eschol.
Note that this force has both vertical and horizontal components. The vertical component of this force has a negligible effect on the Earth's oceans. The horizontal component however has a significant effect. This is what drives the tides in the oceans. The horizontal component this force, the tide-generating force, is depicted in the right half of the above image. (Note that a similar effect arises from the Sun, which also raises tides, but to a lesser extent. The tides raised by the Sun are a bit less than half those raised by the Moon.)
While this tide-generating force is very small, less than 10-6 newtons per kilogram of water, it is ever-present and acts in a coordinated manner over half of the globe, and in an opposite coordinated way over the other half of the globe. Tsunamis (sometimes erroneously called tidal waves) form an extreme example of an impulse response. Because the tide-generating force is ever-present, the tides are a forced response rather than an impulse response.
The tide-generating force at some point on the surface of the Earth is oscillatory over time, with multiple frequency components. The response of a resonant system to an oscillatory forcing function is to oscillate ate the frequency of that forcing function, but modified by the natural frequency of the resonant system. This results in a dynamic (as opposed to equilibrium) theory of the tides.
Laplace first proposed his dynamical theory of the tides 240 years ago. Variations in the tidal forcing, coupled with bathymetry and the Coriolis effect, results in a number of tidal resonance systems. Improvements to Laplace's dynamical theory of the tides in the latter part of the 19th century resulted in a very successful predictive of the tides. The tides can be predicted locally with remarkable success thanks to the late 19th / early 20th century works of George Darwin (Charles Darwin's son), Ernest William Brown, Arthur Thomas Doodson, A.E.H Love, and others.
That 100 year old theory is capable of predicting tides locally by observing the tides at that point over a span of time and performing harmonic analyses. A global point of view was out of reach to those late 19th / early 20th century scientists. Thanks to global observations and to modern computing, a global point of view is now becoming within reach.
Best Answer
I think I might understand another facet of your question besides what is addressed in the comments. Let me demonstrate a result in classical mechanics which I think might alleviate your concern.
The result is that
Given a system of particles, the center of mass of the system moves is though it were a point mass acted on by the net external force on the system.
So if you think of the Earth-Moon system as being acted on by a net external force which is simply the gravitational attraction to the Sun (to good approximation), then what's happening is that this entire system is orbiting (essentially freely falling) around the sun. The details of what's happening in the Earth-Moon system itself are described by the first link in the original comments, but for purposes of what's happening to the entire system consisting of the Earth+Moon when it orbits the Sun, the details of the internal interactions don't really matter.
Here is a proof of the statement above:
Consider a system of particles with masses $m_i$ and positions $\mathbf x_i$ as viewed in an inertial frame. Newton's second law tells us that the net force $\mathbf F_i$ on each particle is equal to its mass times its acceleration; $$ \mathbf F_i = m_i \mathbf a_i, \qquad \mathbf a_i = \ddot{\mathbf x}_i $$ Let $\mathbf f_{ij}$ denote the force of particle $j$ on particle $i$, and let us break up the force $\mathbf F_i$ on each particle into the sum of the force $\mathbf F^e_i$ due to interactions external to the system and the net force $\sum_j \mathbf f_{ij}$ due to interactions with all other particles in the system; $$ \mathbf F_i = \mathbf F_i^e + \sum_j \mathbf f_{ij} $$ Combining these two facts, we find that $$ \sum_i m_i\mathbf a_i = \sum_i \mathbf F_i^e + \sum_{ij} \mathbf f_{ij} $$ The last term vanishes by Newton's third law $\mathbf f_{ij} = -\mathbf f_{ji}$. The term on the left of the equality is just $M\ddot {\mathbf R}$ where $M$ is the total mass and $\mathbf R$ is the position of the center of mass of the system. Combining these facts gives $$ M\ddot{\mathbf R} = \sum_i \mathbf F_i^e $$