Assuming you've got files in /var/www already, you'll want to change ownership recursively:
Alternatively, you could change the permissions
sudo chown -R <username> /var/www
if you want all users to be able to make changes.
sudo chmod -R a+rwX /var/www
Probably the most correct thing to do, however, is to make a group to access the folder:
This creates a new group, adds you to the group, gives the group ownership and read and write permissions to the folder, and ensures that files created in the folder will continue to be owned by the group.
sudo groupadd www
sudo useradd -g <username> www
sudo chown -R :www /var/www
sudo chmod -R g+rwX /var/www
sudo chmod g+s /var/www
Hope that helps!