This scene is symbolic of his wife Mary, and the lifeless dead body (Mary, as
her husband seemed to view her) that lay in bed when she was ill. A butterfly
is a creature of beauty and freedom, much like how James viewed his wife, yet
the illness has destroyed these qualities (at least superficially, but
gradually with time depression destroys a person's inner beauty. Not the soul,
the essence of the person though). Thus, the butterfly depicts the death of a
beautiful creature. One as well, which shouldn't remain caged but should be
free to fly as it wished (the empty cages).
------------I found this on a plot faqs somewhere .