You can remove an observer by using its tag. You get the tag when you add the observer [1].
For example: self.observerTag = slicer.mrmlScene.AddObserver(vtk.vtkCommand.ModifiedEvent, self.sliceModifiedCallback)
You can then remove the observation by doing: slicer.mrmlScene.RemoveObserver(self.example).
If you have a lot of events to observe, I would suggest that you take a look at the VTKObservationMixin. This should make it easier for you.
You could listen to the Qt signal sent by the qSlicerModuleFactoryManager::moduleAboutToBeUnloaded(QString). This signal should be sent when the application closes.
You can access the qSlicerModuleFactoryManager using the slicer application like so: slicer.app.moduleManager().factoryManager().
Most often you remove observers in the cleanup() method of the module widget class. If you want to have observers only while the module is active then add observers in enter() and remove observers in exit() method of the widget class.