Allow X: What’s the difference between "for the sharing of X" and "to share X"? Do they mean the same thing?

I think for the second sentence, what you meant was:

"Presentation events allow sharing knowledge."

"Sharing" is the present participle form and the gerund form of the verb "share." "To share" is the infinitive form of the verb "share." In some languages, the gerund form and infinitive form are exactly the same. That is not the case with English, though.

In the second sentence, the usage is gerundial, that of a gerund. Therefore, the word required is the gerund "sharing," not the infinitive "to share."

As for your question...

The difference between saying "for the sharing of knowledge" and "sharing knowledge" is just semantics. While words with their own meanings are being introduced in the first sentence that technically make the second sentence different, the actual meaning being conveyed by the speaker does not change.

Moving from the first sentence to the second, all that changes is the gerund "sharing knowledge" appears as a noncount noun and direct object of the verb "allow," which a direct object adverbially modifies its verb, rather than "allow" having no direct object but instead a prepositional phrase starting with "for" adverbially modifying it, the gerund "sharing" appearing in that prepositional phrase as a count noun followed by the prepositional phrase "of knowledge" adjectivally modifying it.

In the phrase "sharing knowledge," "knowledge" appears as the direct object of "sharing," the present participle of the verb "share." When the present participle "sharing" is used as a gerund, meaning used as a noun form of the verb, the direct object "knowledge" becomes an adjectival modifier that appears postpositively.

In "the sharing of knowledge," the present participle "sharing" has no direct object. What is being shared is instead introduced by the prepositional phrase "of knowledge." Were "sharing" being used as a verb, the prepositional phrase "of knowledge" would be adverbial, but since "sharing" is being used as a gerund, the prepositional phrase is adjectival.

Brass tacks: There is more than one way to skin a cat.

While the two sentences are mechanically different as far as grammar is concerned, they nevertheless identically use a noun form of the verb "share" followed by an adjectival modifier denoting "knowledge" in a combined phrase that modifies the verb "allow," so their meaning is therefore also identical.