In the sentence "我很喜欢这里", 这里 is a direct object of the verb 喜欢, so you don't need the preposition. This should be better translated as "I like this place very much", and not "I like here very much", as implied in your question. This second translation is also weird in English, by the way.
In the other sentence "我呆在这里", 在这里 gives the location that modifies the verb 呆. When 这里 is used as a location instead of just an ordinary object, you need the preposition 在. In the case of "liking a place", "a place" is an object taken by "like", not a location, so the preposition is not needed.
To put it another way, suppose I replace 这里 with 俄罗斯. Then it's quite clear that
我很喜欢俄罗斯 = I like Russia very much (no preposition, because "like" requires a direct object, "Russia")
我呆在俄罗斯 = I'm staying in Russia (preposition required because "stay" requires a location)
As for the example given by bear234 - "这里曾经发生过一个很感人的故事" - 这里 now functions as the subject/topic of the sentence, even though it also gives the location where the "感人的故事" took place, so the preposition 在 is rarely used, if at all. The comma is also superfluous - though it may have stylistic value - in this particular sentence.
Hope that helps.