The purpose of a diagram in an informational text is to summarize information in a visual way.
An informational text is part of the non fiction category, it aims to share knowledge about the natural or social world. For that instance diagrams come in handy when trying to understand a process description, like photosynthesis.
A diagram can help us understand and remember ideas because it's a graphic aid that sumarizes information using visual resources.