Jurisdiction: england-and-wales
TLDR: The concept of legal advice as a legal activity lacks a narrow definition. However, in my view it excludes general statements of law (e.g. "Doing X is illegal") and is limited to the application of the law to particular cases (e.g. "In the specific circumstances of your case, you should do X because the law is Y").
As noted in Rock Ape's answer, legal advice is a "legal activity" for the purposes of the Legal Services Act 2007 (albeit not a reserved legal activity hence it can be carried out by a layperson), and the definition there is fairly broad. Much legislation is deliberately phrased in this way in order to allow the law to be flexible and adaptable. In such cases the only way to narrow down the definition is to find a binding ratio in a court decision. As generic legal advice is not regulated in E&W my guess is that the issue hasn't arisen yet in the courts.
However, as you've noted in your question, the provision of certain specific types of legal advice is regulated in england-and-wales. While not directly applicable to the generic category of legal advice in the LSA 2007, I believe it is useful to examine the definitions of legal advice in these specific cases to see what the approach is. As far as I'm aware there are only two such types: immigration, and claims management.
Immigration advice
Section 84(1) of the Immigration and Asylum Act 1999 provides:
No person may provide immigration advice or immigration services
unless he is a qualified person.
Section 82(1) defines immigration advice as:
[...] advice which — (a) relates to a particular individual; (b) is
given in connection with one or more relevant matters; (c) is given by
a person who knows that he is giving it in relation to a particular
individual and in connection with one or more relevant matters; and
(d) is not given in connection with representing an individual before
a court in criminal proceedings or matters ancillary to criminal
proceedings;
"Relevant matters" here simply refers to a list of topics (e.g. asylum claims, leave to remain) and so is not important for the purpose of defining what is meant by advice.
So, in the context of immigration, a mere statement such as "Doing X is illegal" or "In order to achieve Y, procedure Z must be followed" is not legal advice because it does not relate to a particular individual. On the other hand, if someone approaches you with the specific facts of their case and asks you what they should do in order to claim asylum, then you would be giving legal advice if you helped them in a non-generic way.
Claims management advice
Section 19(1) of the Financial Services and Markets Act 2000 provides:
No person may carry on a regulated activity in the United Kingdom, or
purport to do so, unless he is (a) an authorised person; or (b) an
exempt person.
Section 22(1B) provides:
An activity is also a regulated activity for the purposes of this Act
if it is an activity of a specified kind which (a) is carried on by
way of business in Great Britain, and (b) is, or relates to, claims
management services.
Section 419A(1) provides:
In this Act “claims management services” means advice or other
services in relation to the making of a claim.
The specified claims management services are set out in Part 3B of the Financial Services and Markets Act 2000 (Regulated Activities) Order 2001. There are 6 specified categories: personal injury, financial services, housing disrepair, specified benefits, criminal injury, and employment. The specified activities for each of these are set out in articles 89H, 89I, 89J, 89K, 89L, and 89M respectively. Each of those articles have a sub-paragraph which follow this pattern:
Each of the following activities is a specified kind of activity when
carried on in relation to a [claims management] claim — (a)
advising a claimant or potential claimant; [...]
While not as specific as for immigration advice, the approach is similar: it is only regulated advice if it is being given to a "claimant or potential claimant". So, a general statement of the position of the law to someone who is not a claimant or potential claimant, will not constitute regulated advice.
Generic legal advice
Turning back to the Legal Services Act 2007, and the wording at section 12(3)(b)(i) which was referred to in Rock Ape's answer:
the provision of legal advice or assistance in connection with the
application of the law or with any form of resolution of legal
disputes
It seems to me that the approach here is also similar to the above two cases. To be a "legal activity" the advice needs to be either "in connection with the application of the law" or "with any form of resolution of legal disputes". In my view this means that, as with immigration and claims management, there needs to be an application to the specific facts of a particular case. Generic statements of law which do not apply to specific cases will fall outside the definition.
For example, "running a red light is illegal" is merely a statement of what the law is. It is not an application of the law, nor does it involve the resolution of a legal dispute. On the other hand, if someone runs a red light and you advise them on what their defences might be or how to conduct their trial, that is both an application of the law to the specific circumstances, and it involves the resolution of a legal dispute.
Additional comments
As you made a number of comments on the other answers, I'll try to tackle a couple of those here.
If the instructor tells the learner driver in advance about what is legal I can see that that would be "legal information" under your definition. But if the driving instructor says that a particular fact which they have just witnessed is illegal, how is that not legal advice under your definition?
As noted above, trying to pin down a narrower definition in order to definitely resolve such dilemmas is problematic because only a court can interpret the legislation definitively. In my view, your second scenario still falls short of the definition because it is not advice. Google defines advice as "guidance or recommendations offered with regard to prudent future action." Telling someone that what they did is illegal is a statement of fact, not guidance or a recommendation.
There is no definition in E&W because there does not need to be.
That's not right. After all, the law does include certain types of legal advice within the definition of "legal activity". The reason for that is because section 24 of the Legal Services Act 2007 foresees that there may be a future need to make it a reserved legal activity by way of secondary legislation. No, the correct view is that the definition is exactly how Parliament intended it to be, and any narrowing of the definition is to be left as a matter for the courts.