Lincoln said that getting a letter back from Mr. Boggs was “so cool.”

“I feel like I could do this for a very long time,” Lincoln said.

Older people tend to have fewer social connections, particularly as their physical and mental health declines, said Dawn Carr, a sociology professor at Florida State University who studies aging and health. They are less likely to have jobs and the casual relationships that come with those jobs, she said.

Social isolation and loneliness are linked to poorer physical and mental health outcomes, said Dr. Carr, who is also a faculty associate at the Pepper Institute for Aging and Public Policy. Because people over 60 — and especially those over 80 — are particularly vulnerable to the coronavirus, social-distancing measures strictly warn or prohibit people from interacting with them.

“They are less likely now than ever to have even the small interactions that they had in daily life,” Dr. Carr said.

The pen pal programs are trying to change that.

“It makes a connection between a younger person and an older person,” said Pat McCormick, 79, who received a letter at Bickford Senior Living from a student who wrote about cheerleading and an upcoming trip to Texas. “It’s interesting for me to hear what these young people are doing.”

A similar program in Warminster, Pa., sought volunteers to write one email a week about a personal hobby or a funny story that would then be passed along to someone living in a nursing home. (The program’s website now says it is “at capacity” and cannot take any more volunteers.) In March, a retirement community in Sedro-Woolley, Wash., put out a call on social media for letters from children “in an effort to stay connected to our community and help parents combat boredom with their little ones at home.”

Dr. Carr said that such programs would be more successful in helping older people who are isolated if they encouraged two-way communication — a “back and forth” — and created social bonds. She said that intergenerational communication could be particularly beneficial, fostering empathy and civic engagement.