either you have the headlights on or you have the key in the ignition. When you open the door it beeps to let you know something isn't right to leave the car.
or is this anytime you open the door? even with the car running? then there is something wrong.