President Reagan today courted Cuban-American voters in this politically strategic state by assailing communist "deprivation and tyranny" in Fidel Castro's Cuba and promising that the United States would stand firm in Central America.

"Today, our nation is confronted with a challenge of supreme importance," Reagan said in a speech before 2,000 at a luncheon sponsored by the Hispanic Chamber of Commerce. "A faraway, totalitarian power has set its sights on our friends and neighbors in Central America and the Caribbean. If we don't meet our responsibilities there, we'll pay dearly for it.

"The security aspect of this challenge must be addressed," Reagan continued. "Those who suggest otherwise are courting disaster. So we are helping our friends to defend themselves--and we will continue to help them, showing them we will stand by them in their hour of need."

The president attempted to balance this unspecific assertion of U.S. military resolve with a pledge of economic assistance to underdeveloped nations in the Caribbean basin, mentioning several U.S. programs that have provided agricultural aid to nations in the region.

"Those who claim our support is only of a military nature are building a huge straw man," Reagan said.

Reagan's speech here launched a 25-day trip that is intended primarily to give him a restful, riding vacation on his ranch northwest of Santa Barbara.

But the president is mixing a heavy dose of politics with his vacationing as he prepares for what aides say in all probability will be a second-term election campaign. Reagan particularly is emphasizing the Hispanic vote, considered a growing and possibly crucial force in the 1984 election.

After his speech here, he was scheduled to fly to El Paso, where he is to address a Mexican-American organization, the American GI Forum, on Saturday. On Sunday he is to spend six hours in Mexico, meeting in La Paz with Mexican President Miguel de la Madrid.

One tactic of Reagan's political advisers is to focus media attention, especially television, by emphasizing the same theme or constituency for days on end. In advance of this trip, Hispanics were invited to the White House for four of the last five working days for meetings with the president at which he stressed economic recovery and his Central American policies.

White House strategists acknowledge that they face resistance on foreign policy and domestic issues among Hispanic voters in the Southwest, who are predominantly Mexican American.

But the strongly anti-communist and relatively prosperous Cuban constituency in Florida, a base of Reagan's presidential campaigns here in 1976 and 1980, is considered a stronghold for him. There are nearly 200,000 registered Hispanic voters in Florida, and at least 100,000 more are eligible, according to recent estimates.

Reagan began his speech today by sketching the achievements of Hispanic Americans and defending his economic program, calling particular attention to the small increase in the producer price index that was announced in Washington today, which he interpreted as a sign that inflation is under control.

He received a standing ovation when he pledged support to minority owned businesses and said, "Our goal isn't welfare or handouts, it's jobs and opportunity."

Then he contrasted the economic and political freedoms in the United States to conditions in communist countries, which he said "don't believe in the political and social freedoms we hold dear" and "are contemptuous of the worship of God."

"That philosophy is alien to this hemisphere and has brought deprivation and tyranny wherever it has gained a foothold," Reagan said.

"No better example exists than Cuba," the president continued. "Under Castro's rule, Cuba has become the economic basket case of the hemisphere. The Cuban government sells its young men as Soviet cannon fodder in exchange for a massive subsidy without which it couldn't survive.

"The Cuban people have been betrayed. They have neither freedom nor material goods. The only things abundant there today are slogans, weapons, repression and shortages. Food and the necessities of life are severely rationed."

Reagan was cheered for these remarks, and was given another standing ovation later in his presentation.

Then he compared "repression and economic failure" in Cuba with what he said were the recent economic achievements of Jamaica, the most conspicuous U.S. ally in the Caribbean.

"Jamaica flirted with radical socialism and it turned a tranquil, peace-loving country with great economic potential into a bitterly divided, impoverished society," Reagan said.

According to the U.N. Economic Commission, however, Cuba was the only country in Latin America to show an increase in per capita income last year. Median individual income rose 4 percent, and Cuba's gross national product, the total value of goods and services produced, increased 2.7 percent, the U.N. study said. The CIA estimates the Soviet subsidy at $4.7 billion annually.

After the speech members of the audience started chanting: "Rea-gan, Rea-gan" over and over in a response reminiscent of the 1980 presidential campaign.