EU Charter of Fundamental Rights

Title VI: Justice

Article 47 - Right to an effective remedy and to a fair trial

Everyone whose rights and freedoms guaranteed by the law of the Union are violated has the right to an effective remedy before a tribunal in compliance with the conditions laid down in this Article.
Everyone is entitled to a fair and public hearing within a reasonable time by an independent and impartial tribunal previously established by law. Everyone shall have the possibility of being advised, defended and represented.
Legal aid shall be made available to those who lack sufficient resources in so far as such aid is necessary to ensure effective access to justice.

Article 49 - Principles of legality and proportionality of criminal offences and penalties

1. No one shall be held guilty of any criminal offence on account of any act or omission which did not constitute a criminal offence under national law or international law at the time when it was committed. Nor shall a heavier penalty be imposed than that which was applicable at the time the criminal offence was committed. If, subsequent to the commission of a criminal offence, the law provides for a lighter penalty, that shall be applicable.
2. This Article shall not prejudice the trial and punishment of any person for any act or omission which, at the time when it was committed, was criminal according to the general principles recognised by the community of nations.
3. The severity of penalties must not be disproportionate to the criminal offence.