I believe that when you die, only your body dies, but your spirit continues to exist as a form of energy. Most spirits cross over into an alternate dimension after the body dies (Heaven, or the other side, or whatever you want to call it). Some, for one reason or another, stay behind instead of crossing over, which is what leads to hauntings.
Many believe that the orb is the state that requires the least amount of energy to maintain, therefore ghosts/spirits tend to be in the "orb" state most of the time. With enough energy, the orb can become visible, or it can manifest itself in other shapes, such as a mist or apparition. Cameras are more sensitive than the human eye and can often pick up orbs that are otherwise invisible.
This is just my thoughts, I'm sure there are as many theories out there as there are orb pictures. =)