Using the UI Framework enables you to easily create a UI that fits in with the standard OpenMRS Reference Application look and feel and means that customisations you make to the reference application styles will be reflected on your pages.
Using the App Framework allows you to easily add buttons and links to existing parts of the OpenMRS Reference Application without needing to modify the source code for those pages.
There’s no strict requirement to use those features, but they’re intended to make your life easier and could make it easier to share your work with other developers and other implementors.