We refer to something as "tasty" when it pleases our sense of taste.
Example: It was a tasty sandwich. / This coffee has a very rich taste.
We refer to something as "delicious" when it is highly pleasing, especially to the sense of taste or smell. We can also use the word to refer to something pleasing in a general sense.
Example: There is a delicious aroma of coffee from the cafe. / It was a delicious evening with a performance by the symphonic band. / Albert Einstein once stated, "I live in that solitude which is painful in youth, but delicious in the years of maturity."
As you can see, both words can be used to describe tasty/delicious food; "delicious" has a broader meaning.
Hope this helps.