You have the right to compensation if the airline cannot justify why you were denied boarding. Justified grounds include concerns over health, safety, or incomplete travel documents, but not because the flight was overbooked.
If you are denied boarding, you are also entitled to a replacement flight or, if you decide not to fly, to a refund of your ticket.
Your rights in the event of denied boarding are defined in the European Union’s Regulation EG 261/2004 on the rights of air passengers.