What jurisdiction do the Scottish courts have to declare the suspension of the Westminster parliament is illegal? Since the Scots and English legal systems are different, and nobody has suspended the Scottish Parliament, why wasn't the matter taken through the English courts?
The United Kingdom has 3 legal jurisdictions: England and Wales, Northern Ireland, and Scotland.
Citizens are entitled to bring cases in their own jurisdiction, or any other by mutual agreement (particularly for civil cases). In fact, independent cases are being heard in all 3 jurisdictions.
There is a single UK-wide Supreme Court which acts as the final court of appeal for all jurisdictions (save that which affects EU law).
The UK government is bound by Scots law for its actions in Scotland and has a legal advisor for that purpose, the Advocate General for Scotland. These cases are after all to challenge the actions of the executive.
The Westminster parliament is the parliament of the United Kingdom. Scotland is part of the United Kingdom. (The parliament of Scotland has authority over certain "devolved" matters only.)
Any act of the Westminster parliament or of the UK government affecting Scotland must be lawful under the law of Scotland. This gives Scotland's courts jurisdiction over those acts.
Because Scotland is part of the UK and is represented in Westminster and is subject to the authority of the Westminster parliament, proroguing the parliament affects Scotland.
Since the Scots and English legal systems are different, and nobody has suspended the Scottish Parliament, why wasn't the matter taken through the English courts?
The legal systems of Scotland and England are not completely different. The Acts of Union provided that the various bodies of law in Scotland remained in force, and that much of the judiciary in Scotland remained in place, but it explicitly did away with Scotland's parliament by providing
THAT the United Kingdom of Great Britain be Represented by one and the same Parliament to be stiled The Parliament of Great Britain.
In other words, the systems are not entirely separate because they are both subject to the authority of the UK parliament.
As an aside, the parliament in Holyrood is a rather late comer to the scene. It dates from changes made nearly 300 years after the Union of Scotland and England, or just over 20 years ago. The Scotland Act 1998 specified the matters reserved to the UK parliament in its Schedule 5. These include
1 The following aspects of the constitution are reserved matters, that is—
(a) the Crown, including succession to the Crown and a regency,
(b) the Union of the Kingdoms of Scotland and England,
(c) the Parliament of the United Kingdom,
So the UK parliament is not something the Scottish parliament can legislate about. But the Scottish courts can indeed consider constitutional matters. There is no UK-wide system of courts in which such matters could be heard, and the courts of the jurisdiction of England and Wales don't have jurisdiction in Scotland.
What jurisdiction do the Scottish courts have to declare the suspension of the Westminster parliament is illegal?
The Westminster Parliament is the parliament for all four nations of the United Kingdom. Therefore it MUST run legally as per the laws of all four nations. Regardless of the English and Wales ruling, if it is illegal in part of the United Kingdom, then it is illegal, full stop.
why wasn't the matter taken through the English courts?
It was. As it is a matter for all the nations of the union, it is currently being persued independently in each nation and at a UK level through the Supreme Court.