In England, there is certain criteria to identify if a person is qualified for legal aid. For civil matters, you need to satisfy so called financial eligibility test (show low income) and a merits test (whether the case contains certain parameters). However, there are number of excluded categories that cannot be funded, and these include all personal injury work (save for some instances of obstetric clinical negligence cases) and matters of property, trust, probate, or commercial nature which is, essentially, most areas of civil and commercial litigation.
In criminal cases, to be eligible for public funding, the defendant must pass the means test (show low income) and the merits test (whether the case contains certain parameters). If you are on passporting benefits you satisfy the means test automatically. Application for legal aid shall be made in CRM14 form that can be found here https://www.gov.uk/guidance/legal-aid-crime-eform .