Bless your heart is an idiom that means different things depending on where you're from. Here in Wisconsin I hear people using it as a sort of quaint way of saying "you're sweet" or "what a nice thing to have done."
What a lot of them don't seem to realize is that, in the South, it means "you're an idiot." It's just a very polite way of saying it, usually used either with Yankees who don't realize they're being insulted, or used when talking about someone who isn't present.
If you're going to use this phrase (in writing or otherwise), be mindful of your audience.