This is being widely called a war crime by the BlueSky community but the apparent lack of anything like a legitimate target nearby strongly suggests that this was a guidance failure in the JDAM guided bomb. These are not long distance attack weapons, JDAM are dropped from crewed aircraft.
The New York Times reports the U.S. dropped a 2,000-pound bomb on a family home in Iran, killing a husband, wife, and their 2-year-old son. The paper found no indication of a nearby military target.