Sumoylation primarily occurs in the nucleus but can also take place in the cytoplasm. In the nucleus, it is involved in regulating gene expression and maintaining the structure of the nuclear envelope. In the cytoplasm, sumoylation can affect signal transduction pathways and cytoskeletal functions.