Many causes. There are many things that can cause pain in the upper arm and an evaluation is needed to make the diagnosis. One of the most common causes of pain in the upper arm comes from rotator cuff problems. This leads to pain especially at night, and weakness.
A couple of things. Could be tendinitis or busitis. Less likely would be a rotator cuff tear.