In System Preferences -> General there is an option for "Show scroll bars"
Is it possible to get the selected option here or if scrollbars should be shown based on the user's settings?
It should be possible to access this using defaults terminal command or a declare, my question however is what do you want to do with that information?
If you are using Cocoa, the scrollbars automatically obey this setting, from my understanding there is a feedback request for the listbox to follow this behavior too. If you are creating your own custom view, there is a feedback request for a ScrollView, which again will automagically obey this setting.