The Guidance regarding breaches of immigration requirements is found on pages 46-50 of this publication: Good Character Guidance

Non-compliance with immigration requirements

An application will normally be refused if, within the previous 10 years (before the date of decision), the person has not complied with immigration requirements, including having:
  • failed to comply with (breached) conditions imposed under the Immigration Acts, for example:
    • accessed public funds when prohibited from doing so
    • worked in the UK without permission to do so
    • studied in the UK in contravention of any restrictions on studying
    • failed, without reasonable excuse, to report when required to do so
  • remained in the UK after their leave, including when leave extended by virtue of section 3C or 3D of the Immigration Act 1971 has expired. See: Overstaying
We then have the section about overstaying:

Overstaying

Prior to 24 November 2016, migrants were permitted a grace period of 28 days after the expiry of any leave during which they could make a further application to renew their leave without being penalised as an overstayer.

Changes to the Immigration Rules on 24 November 2016 abolished this 28-day grace period, and now provide for current overstaying to be disregarded only in a very limited number of scenarios. Otherwise it is a ground for refusal. For further information see applications from overstayers.

Where a person overstayed at some point in the 10 years prior to an application for citizenship, discretion to overlook this breach will normally only be considered if it is the sole adverse factor weighing against the person’s good character; and
  • the person’s application for leave to remain was made before 24 November 2016 and within 28 days of the expiry of their previous leave, or
  • the person’s application for leave to remain was made on or after 24 November 2016, and the application did not fall for refusal on the grounds of overstaying because an exception under paragraph 39E of the Immigration Rules applied, or
  • the period without leave was not the fault of the applicant, for example where it arose from a Home Office decision to refuse which is subsequently withdrawn or quashed or which the courts have required the Home Office to reconsider.
And finally:

Illegal entry

If an applicant entered the UK illegally, an application for citizenship will normally be refused if the illegal entry is confirmed as having occurred during the preceding 10 years. If the date of entry cannot be confirmed, or if the person subsequently goes to ground, or absconds, the period of 10 years starts from the date on which the person last brought themselves to or came to the attention of the Home Office.

While there will be circumstances when it would be inappropriate to refuse citizenship to people who entered the UK illegally, claimed asylum and were subsequently granted refugee status, those who need international protection are expected to apply for it at the earliest opportunity and in the first safe country they reach. Consequently, there will be cases where refugees will normally be refused citizenship because they entered illegally and chose not to claim asylum at the first available opportunity, or only claimed after enforcement action was taken against them.
If an application is refused, the fee is non refundable.

If you think any of these issues may apply to you, you may want to seek legal advice before deciding to apply.

See: Legal Advice.