Smartparens is minor mode for Emacs that deals with parens pairs and tries to be smart about it. It started as a unification effort to combine functionality of several existing packages in a single, compatible and extensible way to deal with parentheses, delimiters, tags and the like.
The documentation in the link above and this video paints a picture of a tool that looks like a good fit for a wide range of scenarios that we often face.