Is it better to augment both training and validation sets or just training set?
Is it better to augment data both training and validation sets or just
the training set in order to achieve the best accuracy possible on a
convolutional neural network?

Augmentation is always a good thing provided it represents the actual distribution of data. Augmenting your training set may give you enough samples to train high variance low bias models [as an increase in training set samples, which if are general enough, prevents overfitting]
Validation set augmentation gives you more samples to validate on so it's always good.
But there may be instances where the augmented data closely resembles the initial training set samples. This increases the number of certain samples data points compared to other samples. This may cause the model to overfit due to the biased nature of the dataset. So its always wise to make sure that the samples in your augmented set are not mere copies of your data. For eg: In images, instead of just rotating them, you can add in a random noise.