You can use machine learning, lexicon-based approach, or both of these approaches. Just make sure that the pre-processing of your data is done properly. The less noise of your data the better accuracy of your sentiment analysis.
Deep neural networks are good too if you have a massive amount of data. This could be applied with word embedding techniques. For machine learning and deep learning techniques you need to have labeled examples for training the classifiers. You could create some features to calculate the polarity as well.