God only imputes sin on living things that have a creative mind capable of reasoning, making choices, and who possess (at minimum) a basic understanding of the difference between right and wrong. Beings such as humans and angels meet these criteria, although there does exist a large subset of humans that are not held accountable concerning sin.
There are many things made by the Eternal, in spite of the pain and sufferings they can sometimes cause, that he does not impute as committing a sin.
Inanimate (lifeless, inorganic) objects cannot sin because they do not possess a mind and therefore cannot make choices. This large class of objects includes everything from rocks to clocks and grains of sand to entire galaxies. They behave and interact based on physical laws placed in motion when everything was created.
Plants, although they are alive, cannot sin as they lack a mind and therefore cannot reason. Their existence (how they grow, adapt, etc.) is governed, like inanimate objects, based upon rules put in place before their initial creation.
Animals, even though they (in varying degrees) possess the ability to adapt and learn, also cannot transgress God's law. Their lives, which can exhibit complex behaviors, are governed by a sophisticated program placed in each of them we call instinct.
Humans in the womb, babies and young children (up to the time they begin to understand the basic difference between good and bad) do not have sin imputed to them. For example, the Apostle Paul states that God determined Esau would serve Jacob before they were born and had any chance to do good or evil (Romans 9:11 - 12).
Scripture does offer evidence to an "age of accountability" when God (no doubt on an individual basis) considers a human capable of understanding right from wrong and therefore able to sin.
When ancient Israel became fearful and refused to go into the Promised Land, they were punished by wandering the desert for 40 years (Numbers 13 - 14). Those considered old enough to understand and reject His command (thereby committing a sin) never entered Canaan. The Lord declared, however, that children who "in that day had no knowledge between good and evil" would be allowed to enter their inheritance (Deuteronomy 1:39 - 40).