How do we know quantum entanglement works no matter the distance? It is said quantum entanglement works regardless of distance. 2 particles can be entangled and information is shared instantaneously, even if they are lightyears away from each other.
But how do we know this still works with such a vast distance between both particles? 
I can image experiments in a lab, or even on opposites sides of the planet, but not with light years between them.
So how do we know?
 A: Distance is not a relativistic invariant. Let A be the event marked by my beginning to write this answer, and B the event where I finish writing it. In the frame of reference of my desk, the distance between A and B is zero, but in the frame of reference of an observer moving at $0.9999999c$ relative to the earth, the distance between A and B is millions of kilometers.
If the separation between two events is spacelike, then all we can say is that in other frames, they are also spacelike-separated. The distance between them can be made arbitrarily large by picking an appropriate frame of reference.
So all we need is one experiment showing that entanglement works over spacelike intervals, and it follows that it works over arbitrarily large distances. One such experiment is Guerreiro et al., http://arxiv.org/abs/1204.1712 .
A: Over time experimentors have been succesful in increasing distance over which entanglement could be demonstrated, up to many kilometers.
Let me make a comparison with the history of electromagnetism:
When Maxwell published the theory of electromagnetism we now know as Maxwell's equations one of implications of the theory was that it should be possible to generate a propagating electromagnetic wave, and receive that electromagnetic wave. Heinrich Hertz set out to verify that. The emitter he constructed was kicked to carry a very brief, very strong alternating current by having a spark jumping over. The strong alternating current caused an electromagnetic wave. The receiver was located pretty much next to the emitter. The receiver picked up the electromagnetic wave.
Of course, the distance that this first received wave had travelled was very underwhelming, just a meter or so. But the thing was: there was nothing in the theory to suggest any limit to how far electromagnetic waves can propagate. Indeed, it was soon discovered that there is a range of frequencies that reflects against the ionosphere, and so within a very short time after Hertz' demonstration there were broadcasting antannas broadcasting a signal that could be received all over the world.
Something similar applies in the case of quantum entanglement. The first demonstrations were over relatively short distances, the dimensions of a single bench setup. But to elementary particles even distances of centimeters are vast. So: once quantum entanglement was demonstrated on a single bench setup the picture was pretty clear: nothing in the theory to suggest any cut-off distance, and a demonstration over a distance of centimeters is already a demonstration over a vast distance. 
Of course, the longer the distance the smaller the yield. The longer the transit time the larger the probability of losing the entanglement along the way. So to have an acceptable number of confirmations per second you have to generate and send larger populations of entangled particles. But we have every reason to expect that there is no distance beyond which the yield goes to zero.
A: The answer is "we never know."  There is no way to know for certain whether the laws of physics operate the same on the other side of Jupiter.  Of course, the observations we have made beyond Jupiter have all supported the conclusion that the laws of physics are the same everywhere, but we'll never know for sure.
Accordingly, all we need to really do is have "empirically sufficient" evidence that the effects work at long distances.  For that, we note that distances really don't seem to be the major limiting factor.  The more interesting limit is the speed of light.  If entanglement does a good job of modeling this, then it's a useful theory.
Speed is easier than distance.  If I can time two measurements to be mere nanoseconds apart, my experiment can take place within a room and still exhibit entanglement like effects which cannot be explained via transmissions that travel at the speed of light.  Trivially, if the measurement is triggered by a common signal half way between the parts of my experiment, we can see that I can interact with an entangled pair in ways which are much faster than light-speed communication would permit because there's no time for round trips.
So is that proof that the effects work over the distance of light years? No.  If I did it in a 10ft room, it proves nothing about whether entanglement works in an 11ft room.  But all of our experiments so far have shown that distance has no effect at all.
A: Unfortunately, I don't recall all the details, but it's the experiments that were performed in response to the EPR Paradox, which forced us to accept the non-locality of an entangled state.
These experiments basically create some pairs of entangled particles, mostly photons, send them some distance apart, and measure both in a random way. It can be shown that the precise statistics of these measurements require that one measurement actually influences the other. This result is, what quantum mechanics predicted, and what Einstein, Podolsky and Rosen found absurd (which is why it's called a paradox). Afaik, the consequence of these results is, that we must either accept the non-locality of entangled states, or we must question our notion of physical reality.
These experiments have been performed with various distances, I don't know what the current record distance is. But it's basically pointless to argue about distances once the two measurements are far enough apart that light cannot reach the location of the other measurement before that measurement actually takes place. That's easy for photons to achieve: If the entangled photons go off in opposite directions, and you place a measuring station just after a distance of a single meter, the measurements will take place at the same instant in the lab's frame of reference, but two meters apart. That's enough to rule out any light-speed communication between the entangled particles.
A: The term "quantum entanglement exists" is a subset of the term "there exists a  single quantum mechanical wavefunction describing the system". 
If you know the wavefunction, i.e. have a mathematical description of it, the theory of quantum mechanics has constraints on quantum numbers and their conservation, so quantum numbers are "entangled" because there exists a single wavefunction describing the system, as ayc also states.
Let us take a simple example, the pi0 decay. It decays into two photons/gammas. The pi0 has spin zero. From conservations of quantum numbers ( in this case angular momentum conservation) in the decay wavefunction, one of the photons must have spin +1 and the other -1 the direction being the direction of their motion.
Once the decay has happened and there are no interactions, the spins are unknown for the experimenter, but they are defined by the wavefunction.
If I measure one in the lab and the other reach Alpha Centauri, I know its spin by having measured the one in the lab and using angular momentum conservation. 
This is your confusion:

and information is shared instantaneously, even if they are lightyears away from each other

The information is not shared by the photons, the information is in the head of the experimenter, who sits in the lab.
How do we know this is true? Because we have validated quantum mechanical theory with innumerable experiments, trust mathematics, and extrapolate, all the information here in the lab.
A: The short answer is "No". In fact, the basic fact of life in science is that we never know, so to speak: We have a theory, it makes predictions, which we test, and if the test fails, then we know for certain that the prediction was wrong, roughly speaking. If it doesn't fail, we don't actually know that we were right - but we can feel justified in believing that we are. So, strictly speaking, even if we have experienced $10^7$ times that a rock falls down, we still don't know that it will do so next time. 
Of course, some - most - would say that this is unnecessary sophistry, and I would tend to agree in most cases, within reasonable limits. We have confirmed in experiments that entanglement appears to work over distances of several hundred km, I believe, but claiming that it will work over lightyears is still very much speculation or wishful thinking, IMO.
===EDIT===
In view of the comments so far, I think I should perhaps clarify my position. The fundamental insight that is formalized in what we call the scientific method is, that we can never achieve absolute certainty about the validity of theory through experimentation - the only absolute truth comes in the form of falsification; a successful theory is one in which we have consistently failed to falsify the predictions. This is something we always must keep in mind when we extrapolate based on our theory - just think of Newton's theory of gravity: it works wonderfully for (nearly) all practical purposes, we use it when we hurl our pebble sized satellites out and around several planets and still manage to hit the target most times - but it failed to fully explain the precession of the perihelion of Mercury.
One day - soon, one hopes - we will find situations in which both GR and QM fail. Then we will take the next step forward.
===EDIT2===
I see that my answer got voted down - that's OK with me, but please, if you feel that way, add a comment, so I can learn if I made a mistake, was rude or anything else. I won't hold it against you.
A: 
It is said quantum entanglement works regardless of distance. 2 particles can be entangled and information is shared instantaneously, even if they are lightyears away from each other.

To be perfectly clear: entanglement cannot be used to communicate, no matter how long or how short the spatial separation. This is explained in more depth in this thread, but the basic principle is this:


*

*Suppose you have two entangled particles, say, spins in the up-down entangled state $|{\uparrow}{\downarrow}\rangle + |{\downarrow}{\uparrow}\rangle$.

*Suppose further that you measure the first particle along the up-down basis, and you get the result $s$. Then that will also project the second spin onto the state $-s$.

*Furthermore, depending on your interpretation of QM and on your overall stance on its foundational issues, it is possible to interpret this as an instantaneous action on the second qubit regardless of the distance between them.

*However: you have no control over whether you will get the result $s={\uparrow}$ or $s={\downarrow}$, so you have no control over the "message" that gets sent.


This can be further formalized in the No-Communication Theorem, which basically says that if the system obeys the rules of quantum mechanics, then no shenanigans that you could conceivably pull along these lines can be used to communicate faster than light. Quantum mechanics is a fully causal theory, i.e. there are no scenarios where the effects of a given cause can be observed outside of its future light cone.
On the other hand, it is possible to interpret the situation described in the bullet points above as the particles "communicating" with each other in a non-causal faster-than-light way and then "conspiring" to make that FTL communications channel unavailable to any macroscopic experiment ─ but the second half of that combo is crucial and can never be left out. Some people are OK with that, but I find it deeply unsatisfying as a philosophical position.
Also, to be perfectly clear, the protocol I described above does not actually rely on entanglement, and it is susceptible to a "Bertlmann's socks" explanation where you just put an $\uparrow$ and a $\downarrow$ spins in unlabeled boxes and ship them off. However, this kind of Local Hidden Variable explanation is insufficient to explain the full set of measurement results possible using entangled states: hidden-variable theories are constrained by Bell's theorem to satisfy a set of inequalities on the types and amounts of correlations that they can show, and there are multiple experiments showing that quantum mechanical systems routinely break those inequalities.

However, with all of those precisions in place:

It is said quantum entanglement works regardless of distance.

Yes, this is correct: as far as we know, all of the above works regardless of the spatial separation between the particles. 

But how do we know this still works with such a vast distance between both particles? I can image experiments in a lab, or even on opposites sides of the planet, but not with light years between them. So how do we know?

We have no evidence for this beyond the fact that the theory has worked to explain every experiment we've asked it to explain on all the scales that we've managed to construct working tests of the theory, and the fact that all of our astronomical observations of physics from places that are inaccessible to us (from the presence of helium in the Sun to the thermal spectrum of the cosmic microwave background) can be explained using the same laws of physics that we test using earth-bound laboratories.
It is perfectly possible that any given law of physics will break outside of the range where we've tested it, which is why we keep testing them in newer and bigger regimes; indeed if we do find such deviations, they would be much more interesting than the finding that it's all the same everywhere. However, until and unless we do find such a result, there is no evidence to suggest that it's not the case.
A: Personally I would like to say the statement is not exact or at least not clear so far. If generally we believe the structure of spacetime is closely related with entanglement, then we should be very careful to talk about 'distance/time/velocity' in a case when entanglement is involved. 
My opinion is that when we are playing with two entangled particles, ER=EPR seems to claim that the 'normal' spacetime structure is broken (or at least perturbed) by the entanglement. Under this situation, it's not very strict to say 'the two particles are far away' since the tiny wormhole between them might just provide a shortcut so that their 'distance' is 0. In fact, the observed fact that entangled particles show an instantaneous correlation seems to claim that they ARE the same point.  
Finally, I believe before we can complete the quantum gravity to integrate QM and GR, there should be no definite answer to this question. 
A: I consider the question of how far quantum entanglement works this way:
For as long as entanglement is considered a mysterious Quantum phenomenon and discussed in terms of wave functions or other such mathematical descriptions it is hard to think of it as something that can survive great distances across space (and time).
However, if you go right back to the root of it - we discovered entanglement when we were experimenting with correlated properties. Properties we know to be correlated because - if they were not - then conserved quantities - like angular momentum - would not be conserved.
Now, while GR leaves some loopholes and the universe can make energy - there are no indications in the universe that conservation is strictly local and energy and momentum and whatever other else conserved properties can be trivially broken if you just add a bit more space to the middle of the experiment.
i.e. any distance we can show is too short to cause a symmetry violation is also a distance we can expect Quantum entanglement to work over.
A: The premise that "quantum entanglement works" at all is mistaken - there is no action involved - as is the one that "information is shared" at all (regardless of whether it's instantaneous or not). Quantum entanglement is not in any way a vector for transmission of information, and it is really no deeper than taking two balls, one red and one blue, putting each in a box without looking at them, separating the boxes, opening one box, seeing a red ball, and concluding that there is a blue ball in the other box.
When I originally posted the above analogy as a comment, an objection was raised that it's misleading and implies that quantum entanglement is explainable with (local) hidden variables. That is of course impossible by Bell's Theorem as well as many experimental results, and the "no deeper than" analogy should not be interpreted as implying there's any hidden variable. If you really want, you could imagine setting it up as a Schrödinger's cat style thought experiment, distributing the balls in an (approximately) isolated part of the system according to some true random process that's not observed outside. But this is aside from the point.
The point is that, like in the ball analogy, quantum entanglement is about drawing conclusions from a relationship where, conditioned on prior observation of the setup, there is a correlation between certain observables on the outcome.
This is all a consequence of a general principle that, in QM, there's really nothing deeper than conditional probabilities on a giant model that would be meaningless to make any predictions without conditioning on observations.
