I realized a few things about life, reading that book.
What's the meaning of the above sentence? How is it different to the meaning of
I realized a few things about life, having read that book.
I realized a few things about life, reading that book.
What's the meaning of the above sentence? How is it different to the meaning of
I realized a few things about life, having read that book.
In both of these sentences, there is an implied conjunction (or preposition?) linking the two clauses. If you want to use this word order, it would be better to insert the implied conjunctions. If you want to omit them, it would be easier to understand if you start off with the cause clause and follow on with the effect clause.
Reading that book, I realized a few things about life.
There is an implied while here, and it means that, in the course of reading the book, my understanding about life increased.
Having read that book, I realized a few things about life.
There is an implied after here: what it means is that, on completion of reading the book, some things later occurred to me which increased my understanding about life.
Here are the versions with your word order the included conjunctions:
I realized a few things about life while reading that book.
I realized a few things about life after having read that book.
To address your questions in order:
I realized a few things about life, reading that book.
This can be restated as: while I was reading the book, something in the text inspired a thought or realisation which I was then able to apply to my own life.
How is it different to the meaning of: I realized a few things about life, having read that book.
The primary difference lies in the fact that one is ongoing:
While the second occurred after the fact:
It seems that the participle clause (having + past participle) refers to an event that follows chronologically whereas the participle clause using the (verb-ing) form implies a chronological overlap.
Crying, Sarah threw my cellphone onto the ground. (While crying)
Having cried, Sarah's eyes were red and puffy. (After crying)
So if we look at your two sentences
I realized a few things about life, reading that book. (while reading)
I realized a few things about life, having read that book. (after reading)