The European Space Agency's satellite launching program suffered a serious setback yesterday when its Ariane rocket crashed into the south Atlantic because of the failure of all four first-stage engines shortly after liftoff from Kourou in French Guiana.

Space Agency officials said they did not know why the engines failed. They said one stopped firing one minute after liftoff and the other three stopped firing 40 seconds later. The four engines lost all pressure, suggesting malfunction of pumps that drive the fuel into the rocket chambers.

The failure of yesterday's test flight, the second of four planned tests of the rocket, could delay the $1 billion Ariane program and add as much as $150 million to its development cost. Ariane's first flight took place last Christmas Eve and was a success.

The European Space Agency has said that it needs three successes out of the first four flights to move out of development and into the operations stage, in which Ariane would begin to carry large European satellites into orbit for the first time. The Space Agency has firm plans for 15 operational Ariane launches, starting in 1982.

A third test flight of Ariane is planned for late this year, pending an investigation of what caused the failure of the second flight. If major changes must be built into the Viking rocket engine that failed yesterday, the third flight could easily slip into 1981.

If any of the next two flights fails, the Space Agency is committed to conducting a fifth test flight at a cost of $150 million. A fifth flight would delay the entire operational schedule, perhaps forcing some satellites now scheduled to fly on Ariane to move to American rocket launchers.

Ariane is the most ambitious rocket program outside the United States and the Soviet Union. Built largely by the French, it has been financed by 10 West European countries.

About 40 percent larger than the workhorse U.S. Delta rocket, Ariane can put 10,000 pound payloads into low earth orbit and 4,000 pound payloads into 22,400-mile-high hovering orbits that match the rotational speed of the earth.