Can being in the heat cause heart palpitations. I was mowing the grass in the hot sun and after I was done I had a few palpitations?

Yes. At your age, it's most likely related to electrolyte imbalance: you perspire salt and water, but drinking only replaces the water. An electrolyte drink like gatorade can prevent this.