Hi Jordi, that is a very good question you asked. I do not know the grammar rule here, but I believe that I have a pretty solid idea of the meaning and I will do my best to explain it here; please bare with me.
1- A miracle happened to me once.
This example is about a random event that happened to you once, for no particular reason. Maybe, you never even wished for it but it happened to you still.
2- I had a miracle happen to me once.
The second form involves you in the action, more or less. Something about you is responsible for what is happening to you. It could be because you are a prayerful person and miracles follow you around. Then, that one time it manifested itself and you experienced it. Or, It could be because you are a lucky person; we do not really know.
Another example:
1- The flower grew quickly.
To your biggest surprise, this nice thing happened.
2- I had the flower grow quickly.
You could still be surprised that “the flower grew quickly,” but you are somewhat responsible. Now, because of the the structure of the sentence the reason is abstract. Maybe there is no reason at all, but one is implied; it is nonrepresentational.
Last example:
1- The plane took me to Mexico.
You are the the object, right? In a figurative way, you are completely influenced by "the plane's decision."
2- I had the plane take me to Mexico.
It does not mean that you were the pilot, but you did managed to control what was going on. It could be directly or indirectly.
To sum up, those two forms express the same thing. However, the second one carries an "explanation” that is not intended to be accurately depicted.
I hope this helps.