We kept Czech and Poland in our itinerary and in Poland I was intending to stay at her place with her family.
Unfortunately, "met on an internet site" will set off huge alarm bells. It's absolutely not a surprise that you were refused, as any consular officer would suspect that you would simply vanish once you gain entry into Schengen. It would also be strange for a random Indian to stay with a Polish family with no relationship there.
By the way, visa refusals are now stored on a common Schengen-wide database. I would strongly, strongly advise against applying for a Schengen visa in the future unless you have absolutely solid reasons. For instance, if you plan a two week trip and include hotel reservations for each night, then it'll be fine. But again, you need to credible, as it would be nonsense for an Indian to plan a 2 week holiday in some Polish town in the middle of nowhere.
Can this invitation gives a guarantee to consulate officer that I'll be back by time?
No, not now that you've been refused. If you had the official invitation originally, then it probably would've been fine. At least in Poland, the official invitation requires the hosting party to take full financial responsibility for you, including paying a monumental fine if you overstay.