Americans rallied around the flag and their barbecue grills yesterday in Independence Day celebrations that sounded a theme of family reunion. With the nation's TWA hostage crisis ended and the 39 captives back home, families here and across the country hunkered down to the old-fashioned pleasures of picnics, parades and fireworks.

Former hostage Stuart Dahl of Norfolk said he'd leave out the fireworks part, though.

"I've had enough explosion-type noises to last me a little while," the Navy diver said. "I just don't think I'm up to fireworks right now."

After 17 days in the hands of Shiite Moslem gunmen in Beirut, Dahl spent July 4 picnicking with his wife and children: "It certainly has a new meaning for me to be home with my family and to be safe on American soil."

Around the Washington area, holiday celebrations cut across the gamut of boisterous expression and quiet relaxation.

In Fairfax City, a crowd started clogging the streets nearly an hour before the parade, swarming down Main Street where vendors were already hawking hot dogs and soda. Parents pushed empty strollers and toddlers rode their fathers' shoulders high in the air, their eyes opened wide to survey the colorful crowd of more than 20,000.

Squealing children sent up a loud hooray when a float bearing Ronald McDonald motored by and a car decked out with a banner that said "Mary Kay cosmetics IS the American Dream" turned the corner onto Main Street.

Miss Fairfax High and Lord and Lady Fairfax glided along regally. Overhead, seven old-fashioned biplanes skimmed above the telephone lines, one of them leaving a thick stream of white smoke.

Meanwhile, back in the parade staging area, Virginia gubernatorial candidate Wyatt B. Durrette looked around and wondered where the parade went. "I was told to come at 10:30," he said. "It looks like they've started without me."

A moment later, a parade official rushed up and whisked him away. Soon enough Durrette was waving from his own parade vehicle, surrounded by aides wearing "Wyatt Squad" T-shirts.

For many, the day's main dramas were family reunions played out against a backdrop of fife and drum corps, skirling bagpipes and grinning politicians perched in open-top official vehicles.

"The last time I was with my son on a July Fourth was in 1960, when he graduated from flight training school in Arlington, Tex.," beamed Reah Ludlow, an Eton Rapids, Mich., woman visiting her son Leroy in Greenbriar, Va. "It sure is nice to be together again."

At Bull Run Regional Park in western Fairfax County, four generations of the Jones family frolicked and lazed beneath a great oak tree, preparing for a feast from the grill. Larry Jones and his daughter Linda wound their arms around the other's waist.

"This is a real reunion for my daughter and me because we haven't had much contact in recent years," said Larry Jones of Phoenix, N.Y. "I was single for eight years, and I traveled and worked on contract all over the country. I was on the road so much I never really had time and she had a heavy schedule too.

"It sure is good to be together, though," he said, smiling broadly, his eyes welling with tears.

In Ocean City, Md., nine members of the Varvaris family of Jarrettsville, Md., enacted their own family-style patriotic show.

With the sun rising over the ocean at 7:30 a.m., the Varvarises stood in their two-bedroom condo, covered their hearts with their right hands and said the Pledge of Allegiance as they faced a small American flag hoisted indoors for the occasion. They sang the national anthem and shifted the flag to their 12th story balcony.

Then they staked out a section of beach and spent the day relaxing under the sun.

"There's not a good singer in the place," said Peter Varvaris. "But we have a lot of fun doing it . . . . We like to think of ourselves as an all-American family."

In Ocean City 250,000 holiday visitors jammed the hotels and beaches, many of them escaping the other horde that descends on the Mall here every year for the holiday festivities. Most of the vacancy signs that were on early Wednesday night were turned off by yesterday and late arrivals fought bumper to bumper traffic.

For Randy and Rose Cook and their two children of Columbia, Md., this was the first trip to Maryland's premier beach town. Last year they went to the Mall.

"Have you ever tried to go to the Mall on the Fourth of July?" said Randy Cook, 37. "What a joke. We went down there last year and didn't figure 300,000 other people would do the same. This is much more relaxing."

In the District, where thousands were indeed gathering for the traditional festivities on the Mall, many residents sought out the quieter corners of the city's parks and neighborhoods to enjoy their holiday.

Mary Barnes and her family had a picnic at Hains Point. "Let's see, we have chicken, barbecue ribs, hamburgers, hot dogs, baloney and junk," said Barnes, a grandmother whose T-shirt said, "I'd rather be watching All My Children."

At Pershing Park, an event touted as the "July 4th Family Celebration" drew attention to the connection between tight-knit families and drug abuse prevention. Local speakers decried the effects of drugs on the young and lawyer Clarence McKee read a letter of support from President Reagan and Nancy Reagan.

"We are an antidrug type effort but we have couched it in profamily terms," explained Marguerite Gras, an organizer of the event and staff assistant to Del. Walter E. Fauntroy (D-D.C.).

Even at the D.C. Jail, where inmates waited out Independence Day behind bars, the theme of family ties was sounded. There were no flags hanging from the windows of the six-story, beige institution at 1901 D St., SE, but the 30 people waiting to visit prisoners at mid-morning seemed in a holiday mood anyway.

"This is a great day," said one woman who did not want to be identified. "Usually the line is three times as long and you have to wait two hours to get in. It's going much faster today."

Mervin Drakeford, a clerk-typist for the Department of Health and Human Services, said she had come to the jail to visit her two sons who are awaiting trial for murder because the Fourth was her one weekday off.

"By the time I get here after work, it is packed," said Drakeford. "The lines go way out to the parking lot. Usually I wait two hours and if it is 8 o'clock when I get to the head of the line, I get sent home without seeing my boys."

Dressed in a warm-weather outfit of shirt and shorts like most of the people waiting in line, Drakeford added, "When I finish here, I will go home and get my two young ones and go on a picnic. We will watch the fireworks from the park near my house."

In Northwest Washington's Shepherd Park neighborhood, an 11-foot flag cascaded from the awning of Elizabeth Maloney's home, covering most of the steps leading to the porch. The huge flag was given to her by the U.S. Army when her father, Michael Maloney Jr., a World War II veteran, died two years ago.

For the 37-year-old Maloney, the flag is a remembrance of her father as well as the symbol of her country. "My father was a very politically active person," she said. "He encouraged me to be a responsible citizen by being involved in local politics and community activities."

On this July 4, Maloney and her husband, Ed Wolkan, were going next door to neighbor Patricia Heck's house. Heck traditionally invites her daughters and in-laws over for dinner on the Fourth and this year she asked Maloney and Wolkan over, too, for fried chicken, homegrown green beans, watermelon and crabs.

"I think the importance of the Fourth of July," said Maloney, "is not family gatherings alone, but the American family. You don't have to be related by blood to appreciate what you have in common."