Most common use is storing data for javascript. As an example lets say you have a photo and you want to display it on webpage with hover efect being location and time of image taken. The simpliest way of storing data asociated with element is to use data-* attribute on the element:
<img src="my/awesome/photo.jpg" data-location="Paris, France" data-datetime="30.3.2014 16:19:00" />
It's as simple as that.