Sweating at night ('nightsweats') is a relatively common problem. While this can be a normal process that some people have, this can also be a sign of a disease (which can be serious). I would recommend that you discuss this with your primary care doctor
at your next visit.
As mentioned above, this can be normal for some people. If you have always had this, then it is likely a sign of just your normal body temperature regulation (sweating is how the body eliminates heat). However, if this is a new change for you -- this is worrisome and should be investigated by your doctor.
There are a few diseases that classically cause nightsweats. Tuberculosis is one -- which is a lung infection caused by a bacteria. Really, any infection can cause it -- so if you are having fevers or other symptoms please see your doctor. Nightsweats are also known as a "b symptom" along with weight loss
and fevers -- the three of them together can be a sign of lymphoma
(a type of blood cancer). This is relatively rare. A common cause of nightsweats is also menopause in women of the appropriate age. Autoimmune disease can rarely cause it as well.
Please talk to your doctor for more information about how this could affect you.