The title should be pretty self-explanatory. What meanings does each convey? And in what kinds of circumstances would one be used instead of the other?
For example, what are the differences between these two sentences?
図書館に本がある。
図書館には本がある。
This is really no different than the normal use of the scope/topic particle は, except that with には (and では, とは, and any other combination), the scope of the sentence expands to include the particle itself. (I will use "scope" to mean "topic" here; personally I prefer the former, but most people are used to the latter.)
The example sentences you chose might not be the best to illustrate the difference, since the first is a classic example of a sentence lacking a scope. This type of sentence is used for showing existence, possession, and phenomena:
図書館【としょかん】に本【ほん】がある。
- Scope: none
- Statement: There are books in the library.
雨【あめ】が降【ふ】っている。
- Scope: none
- Statement: It's raining.
So in the interest of better tackling your question, let's change the example sentences:
(私【わたし】は)彼【かれ】と会【あ】わなかった。
(私【わたし】は)彼【かれ】とは会【あ】わなかった。
私【わたし】は is in parentheses because it could easily be left out. This is what's known as "implied scope" in Japanese. As you know, if the scope of a sentence is understood by all parties, you have the option of leaving it out entirely.
So let's break down these two. You'll see that while in the first sentence there is only one scope, the second actually has two:
(私【わたし】は)彼【かれ】と会【あ】わなかった。
- Scope (implied): I
- Statement: Didn't meet with him.
(私【わたし】は)彼【かれ】とは会【あ】わなかった。
- Outer scope (implied): I
- Inner scope (explicit): with him
- Statement: Didn't meet.
Now as for what effect this has, the は often adds a hint of comparison or contrast, as repecmps mentioned. While both of the above sentences translate to, "I didn't meet with him," the second hints that although you didn't meet with him, you may have met with someone else. Put into a diagram, the second sentence looks like this:
The dashed green outer rectangle signifies the implied outer scope, the solid purple inner rectangle signifies the explicitly defined inner scope, and the dashed blue inner rectangle signifies the implication that you may have met with someone else.
Let's consider another pair of examples, this time using に and には:
彼女【かのじょ】はヨーロッパに行【い】く。
- Scope: she
- Statement: Will go to Europe.
彼女【かのじょ】はヨーロッパには行【い】く。
- Outer scope: she
- Inner scope: to Europe
- Statement: Will go.
Both of these sentences say, "She will go to Europe," but as with the と/とは example above, the second, by using には, hints at the fact that while she will go to Europe, she may not go to somewhere else (say, the Middle East).
Admittedly this is a tough one for people coming from an English-speaking background, since in English we might use only intonation to mark the difference by stressing the contrasted scope:
彼【かれ】と会【あ】わなかった。 I didn't meet with him.
彼【かれ】とは会【あ】わなかった。 I didn't meet with him.
彼女【かのじょ】はヨーロッパに行【い】く。 She will go to Europe.
彼女【かのじょ】はヨーロッパには行【い】く。 She will go to Europe.
Of course, the above stresses may not be natural in every situation, but they should hint at how English and Japanese handle these situations differently.
In your library example:
図書館に本がある。
Is the simple "There are books in a library".
図書館には本がある。
Would be translated as "As for the library, there are books (in it)".
The に is compulsory in both cases, but は in the second sentence puts the stress on the library.
Most people/students will tell you (like Derek's answer) that は stresses the topic. This doesn't mean much really and is missing the essential point of には.
This form generally appears inside a context, with a preceding sentence expressing some kind of opposition or comparison as in:
"There are fishes in the sea, as for the library there are books (in it)"
That's a primitive example but I think it shows were the difference lies.
Of course there's the idea of topic marker or emphasis on the topic, but the real point here is to compare (implicitly or explicitly) with another sentence.
I think the existing answers are missing something very important, and that is that に (the dative case marker) can be used to mark subjects given certain predicates. This is called the "dative subject construction".
In modern Japanese, I believe you only see this construction if it is contrasted (i.e., には), or if it is embedded. Some examples may help:
ジョンには英語{えいご}が出来{でき}ない。
'As for John, he does not understand English.'
Here, the に marks ジョン as a subject, and the は is used as a contrastive marker. The が marks 英語{えいご} as the nominative object of the intransitive verb 出来{でき}る.
ジョンに英語{えいご}が出来{でき}るとみんな知ってる。
'Everyone knows that John understands English.'
Here, the に marks ジョン as the subject and が again marks 英語{えいご} as the nominative object of the intransitive verb 出来{でき}る. The と embeds everything before it.
I believe that this construction is only allowed when you have
AND there is a が-marked object present (i.e., this will not work: *ジョンに走{はし}れるとみんな知{し}ってる).
There are a few papers that talk about this. The one that comes to mind is "Checking Theory and Dative Subject Constructions in Japanese and Korean" by Hiroyuki Ura. This paper seems primarily focused on proving the subjectality of the に marker rather than when it feels natural to do this in modern Japanese, so be weary of many of the examples in there.
私には means "as for me" and it is similar to 私にとって.
It is a different usage of には completely unrelated to the one that you added as an example in a later edit.