You can use WMI (Windows Management Instrumentation) to get the current brightness level and to also set it.
There is a great tool called WMI Code Creator that allows you to query and execute WMI methods and it also generates the code for you.
To find the current brightness level, using this tool ensure you are on the "Query for data from a WMI class" tab and then select "root\wmi" from the namespace dropdown and "WmiMonitorBrightness" from the Classes dropdown, you will then have access to the CurrentBrightness property. You can then Execute the code that is generated or copy it. You can also change the target language from the "Code Language" menu.
To set the brightness, switch to the tab "Execute a method" and use the WmiMonitorBrightnessMethods class in the root\wmi namespace which contains a method called WmiSetBrightness.