From the most substantial witness accounts and traditional uses of seer stones, it seems that the function of the seer stone was to be an object of mental/spiritual focus to help Joseph Smith attain a visionary state. The hat also assisted with that by blocking out distraction and disrupting the usual visual processes. The parchment appeared in vision (and the translation on the parchment), similar to how we see a dream, without the aid of the physical eye or physical light. One associate of JS said he could see the translation as well with his eyes closed as open. Compare biblical accounts of books (called rolls or scrolls anciently) read in vision by John in Revelations and by Ezekiel. Search for the article, "Seers and Stones" for the historical evidence. The vision is the "spiritual light" that shone in the darkness.
In response Thunderforge's apt comment below, here are three quotes (with context), lifted from the mentioned article (which, in full disclosure, I authored in Interpreter):
In a letter to another Methodist minister dated October 24, 1831,
Booth notes the similarity between Joseph Smith’s visions of celestial
beings and his translation of the Book of Mormon:
Smith is the only person at present, to my knowledge, who pretends to
hold converse with the inhabitants of the celestial world. It seems
from his statements, that he can have access to them, when and where
he pleases. He does not pretend that he sees them with his natural,
but with his spiritual, eyes; and he says he can see them as well
with his eyes shut, as with them open. So also in translating. —
The subject stands before his eyes in print, but it matters not
whether his eyes are open or shut; he can see as well one way as the
other…These treasures were discovered several years since, by the
means of the dark glass, the same with which Smith says he translated
the most of the Book of Mormon.”
The “dark glass” that Joseph Smith
used to translate “most of the Book of Mormon” in Booth’s account
accords with the stone of “rather a dark color” mentioned by Emma
Smith and the “dark colored, opaque stone” mentioned by David Whitmer.
There is a similar description of Joseph Smith closing is eyes while also translating the Book of Abraham with seer stone. Note that the biblical definition of "seer" is a "see-er" of visions. Again, a quote and context from the article:
Wilford Woodruff, in reporting the use of the “urim and thummim” to
translate the book, also called Joseph Smith a seer. John Whitmer’s
history of the Church also portrays Joseph Smith as translating the
Book of Abraham in the capacity of seer: “Joseph the Seer saw these
Record[s] and by the revelation of Jesus Christ could translate these
records.”
The only other account of the translation of the Book of Abraham from
a potential witness is from Lucy Smith, although it is secondhand at
best. A group of Quakers who visited Lucy Smith reported in 1846 that
she told them that
when Joseph was reading the papyrus, he closed his eyes, and held a
hat over his face, and that the revelation came to him; and where the
papyrus was torn, he could read the parts that were destroyed equally
as well as those that were there; and that scribes sat by him writing,
as he expounded.
And back to JS translating the Book of Mormon with a hat pulled "closely around his face," which, in a lamp-lit room, would make the interior of the hat pretty dark...
The stone disappears in the darkness and anything that is seen must be
seen, in David Whitmer’s words, by “spiritual light.” According to a
report of an interview by James H. Hart in 1884, David Whitmer
described the disappearing act of Joseph Smith’s seer stone as it was
replaced by a vision of sacred text:
The way it was done was thus: Joseph would place the seer-stone in a
deep hat, and placing his face close to it, would see, not the stone,
but what appeared like an oblong piece of parchment, on which the
hieroglyphics would appear, and also the translation in the English
language.