Does someone get punished for unknowingly committing a sin or unknowingly hurting a person? Please provide sources, thanks.
We have a LOT of laws about this, depending on the situation, so I'd call this far beyond "ethics" or "philosophy."
If someone doesn't maintain their equipment properly and it causes a death, the punishment is exile. That one's spelled out in Deuteronomy. If someone forgot it was Sabbath and worked, they had to bring a sin offering when there was a Temple. (If they violated a rabbinic commandment by mistake, they should just study more and move on.) Per the link above, my obligation to prevent monetary damage to another covers just about any reasonable outcome -- if I decide to lie down and sleep six inches from someone's iPhone, then I roll over in my sleep and break it, I have to pay for the damage.
I am not, however, liable, if I went to sleep in my own empty bed, then someone put the iPhone next to me, then I rolled over.
So there are a ton of different cases here, depending on what kind of damage we're discussing (sin against G-d, or another person? Death? Torts? Slander?) , and what type of "unknowing" we're discussing (on the spectrum from "gross negligence/willful blindness" to "complete freak accident and thus deemed out of one's control.")
See for example Maimonides summarizing the manslaughter cases (they're described in the Talmud) in his Laws of the Murderer and Preservation of Life, Chapter 6:
There are three categories of unintentional killers. There is a person who kills unintentionally, without at all knowing that this will be the consequence of his actions... There is a person who kills unintentionally, whose acts resemble those caused by forces beyond his control - i.e., that the death will be caused by an extraordinary phenomenon that does not commonly occur.... There is a person who kills unintentionally, whose acts resemble those willfully perpetrated - e.g., they involve negligence or that care should have been taken with regard to a certain factor and it was not.