Having friends allows you to do certain things with them, like play games with them, use Wii U Chat with them, etc.
Differences Between Systems
There are many differences between the Friends List on the Wii U and the Friends List on the 3DS.
The Wii U version of the Friends List allows you to simply create friends by going into their Miiverse profile and selecting "Friend Request" However, some users have blocked friend requests, preventing others from sending them.
If the person who you want to send a friend request to is banned on Miiverse, you can still friend them by going into your Friends List and adding their NNID in the search users.
For the 3DS Friends List, it is much more complicated. You cannot send friend requests directlty to people like you can on the Wii U. Instead, there is a system called friend codes. Each user has a number called a friend code, and you must enter another person's friend code and they must enter your's as well in order to be friends with a person.