They're not two functions. One is a function, the other is the variable in the structure that the function is reading.
There is a slim possibility that the API could change 10 years from now where "1" wouldn't mean the first button.
It's encapsulation. You use accessor functions (getters / setters) so that the underlying structure can be changed without affecting the rest of the code. For example, the "buttons" variable could be renamed "button_list" inside the mouse state structure and the second version will still work, whereas the direct-access one will now be broken. You could even change the variable type of "buttons" to be an int, a struct, or even a SQL query to a database, and that al_mouse_button_down() interface will remain the same. But you surely wouldn't be accessing a SQL database from a variable. *
If you don't mind the extra writing, use accessor functions always.
* (Fun sidenote: The D language supports "property functions" so that a getter/setter can appear to be, and be accessed like a variable. example)
 And to make sure we're talking about the same thing here, you're still missing al_get_mouse_state(state); in your second example, so I'm assuming you meant to put it there.