Prime Minister Margaret Thatcher appointed a six-man panel today to conduct a major investigation into the causes of the Falklands war and resolve, in no more than six months, the issue of why Britain was unable to prevent Argentina's seizure of the islands in April.

Thatcher's statement to Parliament was the culmination of an intense political struggle over how wide the Falklands inquiry should be. For all the satisfaction here with Britain's ultimate victory in the conflict, there are strong undercurrents of questioning, particularly among critics of the government, about why the war was necessary at all.

A Defense Ministry official, meanwhile, announced that British casualties in the war totaled 255 dead and 777 injured. The figures included 18 civilians dead and 18 wounded but did not include three Falkland islanders killed. He noted that several soldiers were injured in recent days while removing Argentine land mines. The British government offered no estimate of Argentine losses.

The Argentine Navy announced that 65 of its men were killed and 331 were missing, most from the sunken cruiser General Belgrano, Reuter reported from Buenos Aires. The Navy listed 169 wounded. The Army previously had announced 261 dead or missing, and the Air Force 55, bringing the Argentine total to 712. The Army announcement last Friday listed 1,105 wounded.

Thatcher's opposition clearly hopes the probe announced today will turn up evidence of serious diplomatic blundering, intelligence failures or inadequate military preparation to dull the gloss of the government's subsequent successes. Thatcher had said she favored giving the investigation a broader historical sweep.

As the prime minister disclosed them today, the terms of reference for the probe reflect significant concessions to opposition demands. The inquiry, she said, will "review" how her government handled its "responsibilities" in the period leading up to the April 2 Argentine invasion, but also delve into the records of previous governments that negotiated with Argentina over the islands.

To be chairman of the panel, Thatcher chose Lord Franks, 77, who as Sir Oliver Franks was ambassador in Washington from 1948 to 1952. He is a long-time chairman of Lloyds bank, and a distinguished academic. Five others were named to the group, two from the ruling Conservative Party, two from Labor and a former senior civil servant. Franks is a member of the Liberal Party.

All are privy counselors, a body of senior officials who perform various sensitive functions, in this case looking into classified records of the present and former governments. They will have access to intelligence documents and their report should be as authoritative as any the British system could devise.

The results of the investigation will be turned over to Thatcher, who theoretically could suppress all or part of it on security grounds. But given the widespread calls for a searching analysis of why the war happened and the fact that four members of the panel are not from her party, it seems likely that the findings will be disclosed.

The Franks inquiry is the most celebrated of a number that have begun in the aftermath of the war. The Ministry of Defense is already assessing how well British equipment performed and evaluating possible changes in the needs of the armed forces. Parliament's select committee on defense is looking into the conduct of the war, including censorship, and the British Broadcasting Corp. said today it would examine its television coverage of the conflict.

During the war, there were accusations, mainly from Conservative politicians, that BBC reporters and other British journalists showed excessive sympathy for the Argentine position in their coverage. More recently, correspondents returning from the conflict have written that they were subjected to sometimes heavy-handed censorship by the military in their efforts to provide impartial accounts of the fighting.

The BBC said its broadcasting research unit will look into all these allegations and issue its report in early 1983.

But controversy over the handling of events leading up to the war by the government and official bureaucracy guarantees widespread attention to the Franks inquiry. Thatcher's own assurances in a letter two months before the invasion that the islands were sufficiently well protected by a small garrison of Marines has been cited by critics as evidence of high-level inattention to the Falklands. Opponents have also charged that the government ignored intelligence in the days just before the Argentine assault that showed decisively that it was coming.

Thatcher's foreign secretary, Lord Carrington, and two Foreign Office junior ministers took initial responsibility for failing adequately to prepare for the invasion and resigned April 5. Carrington was replaced by Sir Francis Pym.

The phrasing of her announcement today leaves the precise nature of the probe up to Lord Franks, while clearly placing the emphasis on the actions of her own government. The judgment of the Franks panel will do much to determine how much responsibility for failure to forestall the Argentine action falls directly on Thatcher and her ministers, and to what extent the conflict was unavoidable.

The others named to the panel were: Viscount Watkinson, a former chairman of the Confederation of British Industry, and Lord Barber, a former chancellor of the Exchequer, both Tory members of the House of Lords; Lord Lever, a prominent Labor politician, and Merlyn Rees, a former home secretary who still speaks for that opposition party on domestic policy issues; and Sir Patrick Nairn, who is retired from a number of top posts in the civil service and is nonpartisan.