source
Actually echoing some value to doesn't help in the brightness as the value will differ from system to system.
First you need to set the brightness of the screen to the level comfortable to you, which can easily be done in System Settings → Brightness & Lock or by using the function keys.
Now go to /sys/class/backlight/<folder> (my folder is intel_backlight)

In this folder you can see the actual_brightness file and the max_brightness file. (If you have made any changes to the brightness after opening this file, don't forget to refresh (using Ctrl+R or F5) to see the actual current settings.)
Now we need the same value as in the brightness every time we start our system. This can be done by changing every time the value in this folder at the startup. We need to change the rc.local file.
First type these commands in the terminal (which can be opened by searching for Terminal in the dash or by pressing Ctrl+Alt+T):
sudo -i
gedit /etc/rc.local
and add the line
echo 900 > /sys/class/backlight/intel_backlight/brightness
Replace 900 with whatever value you need (that is, the value you got from the above procedure). Also replace intel_backlight with the folder name from /sys/class/backlight/.
For example, my /etc/rc.local:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
rfkill block bluetooth
echo 900 > /sys/class/backlight/intel_backlight/brightness
exit 0
As an aside, I added the line rfkill block bluetooth to my rc.local file as I don't use Bluetooth at all but Ubuntu starts Bluetooth every time it reboots (even if the Bluetooth was off before). You can also add it, and just in case you want to use Bluetooth you can always start it again, even if this line is in your rc.local).
Don't change the value of exit 0 in the ending. If that line doesn't exist, add it.
Now even if you have restarted the system you will have the same value that you need.
Be careful to not put a brightness value greater than max_brightness, as that will throw you an error saying that it is an invalid argument.