Do You Need the Life in the UK Test for ILR or Citizenship?

Usually yes for adults, and one pass covers both steps.

Citizenship

Home Office guidance says the British Nationality Act 1981 requires a person applying for naturalisation to have sufficient knowledge of life in the UK and of English, Welsh or Scottish Gaelic (caseworker guidance). The Life in the UK Test is how you show the knowledge of life part.

Source: Home Office: Knowledge of language and life in the UK, caseworker guidance

Settlement (indefinite leave to remain)

The same guidance says that since 2007 certain ILR applications have included the knowledge of English and of life in the UK requirement. The rules are in Appendix KoLL of the Immigration Rules. GOV.UK tells you to check the guidance and form for your own application to see whether you need the test (GOV.UK).

Sources: Home Office: Knowledge of language and life in the UK, caseworker guidance; Immigration Rules: Appendix KoLL; GOV.UK: Life in the UK Test

Pass once

If you passed it for settlement, you do not take it again for citizenship. GOV.UK gives that example among its exemptions, alongside being under 18 or 65 or over (GOV.UK).

Source: GOV.UK: Life in the UK Test

Sources

Keep going