The National Book Critics Circle yesterday awarded its prize for the best fiction book of 1977 to Toni Morrison for "Song of Solomon," (Alfred A. Knopf) a novel that portrays a black man's search for his spiritual heritage in the South.

Robert Lowell's "Day by Day" (Farrar, Straus and Giroux), a collection of poems published just a few days before the poet's death last September at the age of 60, won the poetry award. The general nonfiction award went to "Samuel Johnson" (Harcourt Brace and Jovanovich), a biography of the 18th-century tastemaker by Harvard professor Walter Jackson Bate, and Susan Sontag won the criticism award for "On Photography" (Farrar, Straus and Giroux).

The panel of judges, composed of 18 literary critics from the periodical press, decided the final winners in a surprisingly harmonious two-hour voting session held in a suite in New York's Hotel Algonquin. Five nominees in each category had been agreed upon late last year.

Also nominated for the fiction award were John Cheever's "Falconer" (Alfred A. Knopf) and Joan Didion's "A Book of Common Prayer" (Simon & Schuster), both of which were strong contenders, as well as "The Professor of Desire" by Philip Roth (Farrar, Straus and Giroux) and "Union Dues" by John Sayles (Atlantic/Little Brown).

Other poetry nominees included "Lucky Life" by Gerald Stern (Houghton Mifflin), which made the most popular showing after Lowell's collection, and John Ashbery's "Houseboat Days" (Viking), Stanley Plumly's "OUt of Body. Travel" (Ecco/Viking), and W. D. Snodgrass' "The Fuehrer Bunker: A Cycle of Poems in Progress" (Boa Editions).

Arlene Croce's "After Images" (Alfred A. Knopf) was a near-favorite for the criticism award. Also nominated were Morris Dickstein's "Gates of Eden: American Culture in the '60s" (Basic Books), Richard Poirier's "Robert Frost: The Work of Knowing" (Oxford) and Gore Vidal's "Matters of Fact and Fiction: Essays 1973-1976" (Random House).

General nonfiction nominees were "Dispatches," a war correspondent's account of Vietnam by Michael Herr (Alfred A. Knopf) - the closest contender to the Johnson biography, David McCullough's "The Path Between the Seas: The Creation of the Panama Canal, 1870-1914" (Simon & Schuster), John McPhee's "Coming Into the Country" (Farrar, Straus and Giroux) about experiences in Alaska and Carl Sagan's "The Dragons of Eden: Speculations in the Evolution of Human Thinking" (Random House).

The voting reportedly was less heated than at last year's meeting, in which the judges were almost evenly split between awarding the fiction prize to John Gardner's "October Light" or Renata Alder's "Speedboat." The NBCC judges include Eliot Fremont-Smith of The Village Voice, Walter Clemons of Newsweek, Timothy Foote of Time, Elizabeth Hardwick of The New York Review of Books, John Leonard of The New York Times and William McPherson of The Washington Post, among others.