When you say that you “had a bad day”, what you are implying is that the events that made it a “bad day” are already over. They happened in the past, and are not continuing up to the present. Perhaps you had a bad day at the office yesterday. Maybe you had a bad day at the office today. But right now, you are no longer at the office, so chances are the “bad day” will no longer continue. It is over.
When you say that you “have had a bad day”, what you are implying is that the bad day is not over as yet. It may still continue. You are saying that you have had a bad day “so far” and chances are the rest of the day will be bad as well. The bad day isn’t over as yet! The events that have made it a bad day began in the past and are continuing up to the present moment and with the kind of luck you have been having, they may even continue into the future!
Here are a couple of more examples.
“I had the car for twenty years” and “I have had the car for twenty years”. The first sentence implies that you had the car with you for twenty years. But now you no longer own the car, perhaps you have sold it. The second sentence, “I have had the car for twenty years” suggests that you bought the car twenty years ago and you still have it. You still continue to be the owner of the car. The “action” (as our grammar books would put it!) of owning the car began twenty years ago and it still continues.
*Janani had a headache (yesterday/this morning). (She no longer has one now)
*I have had a girlfriend for two years. (I still have a girlfriend)