It depends.
Python 2 used ASCII as default encoding for source files.
Python 3's default is UTF-8.
So, if you intend to only support Python 3+ then you don't have to declare the utf-8 encoding as it is already the default.
If you intend to support Python 2 as well and you have non-ASCII string literals then you should declare an encoding.
If your text editor also needs a coding declaration (e.g., if your Unix locale is set to, say, Latin-1, but your code is UTF-8), Python's lenient syntax allows a single declaration to be used for both—e.g., # -*- coding: utf-8 -*-
is recognized by both emacs and Python.
Some official information:
Python 3's docs about unicode support: https://docs.python.org/3/howto/unicode.html#python-s-unicode-support
PEP 263 that introduced the encoding declaration syntax: https://www.python.org/dev/peps/pep-0263/
PEP 3210 about changing the default encoding from ASCII to UTF-8 starting from Python 3.0: https://www.python.org/dev/peps/pep-3120/