J. Woodland Hastings, a Harvard biochemist whose improbable discovery of how bacteria communicate became the foundation for groundbreaking research in the development of more effective antibiotics, died on Wednesday at his home in Lexington, Mass. He was 87.

The cause was pulmonary fibrosis, his family said.

Dr. Hastings devoted much of his career to studying bioluminescence, the light emitted by organisms like bacteria, fireflies and jellyfish. He was known for recognizing overarching biological processes in the humblest of organisms.

“One of Woody’s great fortes was coming up with concepts,” Ken Nealson, a microbiologist who worked with Dr. Hastings, said in an interview on Thursday. “He would see things other people wouldn’t see.”

In the late 1960s, Dr. Hastings and Dr. Nealson, then a postdoctoral fellow, noticed something curious about cultures of the luminescent marine bacterium Vibrio fischeri. (V. fischeri floats freely in the ocean and appears in greater concentrations in fish and squid.) The bacteria glowed intensely only after they reached a certain density — in a sense behaving like an army that waits until it has mustered enough troops to launch an attack. Dr. Hastings and Dr. Nealson surmised that the tiny organisms must be able to recognize the concentration of their fellows, probably through a signaling substance that they release and that then travels among them.