For Ubuntu prior to 12.04 assuming the user already exists
sudo adduser username admin
For 12.04 and later
sudo adduser username sudo
username with the name of the user.
If you check the sudoers file
sudo cat /etc/sudoers you will see this (from 12.04) or similar
# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
# See the man page for details on how to write a sudoers file.
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
%sudo ALL=(ALL:ALL) ALL says members of the sudo group have administration privileges. The commands at the beginning of this answer add the user to the sudo or admin group as appropriate for the version of Ubuntu you are using. There is more information here:
RootSudo - Community Ubuntu Documentation.