They have slight differences in meaning, but not much:
1) "My favorite flower is lily." As Anthony said, this one sounds very strange. You'll need to add a few more words in there for it to sound well; perhaps try "my favorite type of flower is lily," since that's what you're trying to say.
2) "My favorite flower is the lily." This basically means what you're trying to say in #1, but you're wording it differently. Instead of using "type of," you've substituted it with the definite article. It still means the same thing though: out of all the different types of flowers, you like the lily.
3) "My favorite flower is a lily." This one is specific: instead of talking about your favorite type of flower, you're identifying a specific flower you like the most, and that flower happens to be a lily.
4) "My favorite flowers are lilies." This one means the same thing as #2. You can pluralize both nouns to indicate that you love lilies overall.
I hope I've helped. Please let me know if you're confused or have more questions.