To store and transfer genetic materials.
In the name nucleic, you can sort of see nucleus and since the nucleus is where DNA is stored, you can use this to remember that the nucleic acid holds genetic materials.
Hope this helps!